Много рефактора

This commit is contained in:
2023-12-19 03:58:37 +02:00
parent 253eafca3b
commit 07f905ef64
24 changed files with 2748 additions and 3199 deletions

View File

@@ -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]);
}
}