Много рефактора
This commit is contained in:
@@ -31,7 +31,7 @@ class Clan
|
||||
}
|
||||
}
|
||||
|
||||
private function join(string $clanname)
|
||||
private function join(string $clanname): void
|
||||
{
|
||||
Db::sql('update users set clan = (select id from clan where clan.name = ?) where id = ?', [$clanname, $this->userid]);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class Clan
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
public function printClan()
|
||||
public function printClan(): void
|
||||
{
|
||||
echo '<img style="vertical-align:text-bottom;" src="' . Config::img() . '/i/align/align' . $this->getAlign() . '.gif" alt="Склонность">' . $this->printLogoImage() . $this->getName();
|
||||
}
|
||||
@@ -88,4 +88,9 @@ class Clan
|
||||
{
|
||||
return !empty($this->id) && $this->status === 0;
|
||||
}
|
||||
|
||||
public static function addExp(int $value, int $clanid): void
|
||||
{
|
||||
Db::sql('update clan set exp = exp + ? where id = ?',[max($value,0), $clanid]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user