refactor
This commit is contained in:
@@ -13,6 +13,12 @@ class ClanInfo
|
||||
|
||||
public static function getNameById(int $id): string
|
||||
{
|
||||
Db::getValue('select name from clan where id = ?', [$id]);
|
||||
$clan = self::getById($id);
|
||||
return !empty($clan['name']) ? $clan['name'] : '';
|
||||
}
|
||||
|
||||
public static function getById(int $id): array
|
||||
{
|
||||
return Db::getRow('select * from clan where id = ? and status = 1', [$id]) ?: [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user