mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-19 20:13:27 +02:00
phpstan level 2
This commit is contained in:
@@ -55,7 +55,7 @@ elseif($action == 'step1' && $action_type == 'email')
|
||||
</TD></TR></FORM></TABLE></TABLE>';
|
||||
else
|
||||
{
|
||||
$insec = $account->getCustomField('email_next') - time();
|
||||
$insec = (int)$account->getCustomField('email_next') - time();
|
||||
$minutesleft = floor($insec / 60);
|
||||
$secondsleft = $insec - ($minutesleft * 60);
|
||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
||||
@@ -118,7 +118,7 @@ elseif($action == 'sendcode')
|
||||
}
|
||||
else
|
||||
{
|
||||
$insec = $account->getCustomField('email_next') - time();
|
||||
$insec = (int)$account->getCustomField('email_next') - time();
|
||||
$minutesleft = floor($insec / 60);
|
||||
$secondsleft = $insec - ($minutesleft * 60);
|
||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
||||
|
@@ -23,9 +23,15 @@ $guilds_list = new OTS_Guilds_List();
|
||||
$guilds_list->init();
|
||||
if(count($guilds_list) > 0)
|
||||
{
|
||||
/**
|
||||
* @var OTS_Guild $guild
|
||||
*/
|
||||
foreach($guilds_list as $guild)
|
||||
{
|
||||
$error = 0;
|
||||
/**
|
||||
* @var OTS_Player $leader
|
||||
*/
|
||||
$leader = $guild->getOwner();
|
||||
if($leader->isLoaded())
|
||||
{
|
||||
|
@@ -117,6 +117,9 @@ if(isset($todo) && $todo == 'save')
|
||||
$ranks = $new_guild->getGuildRanksList();
|
||||
$ranks->orderBy('level', POT::ORDER_DESC);
|
||||
foreach($ranks as $rank) {
|
||||
/**
|
||||
* @var OTS_GuildRank $rank
|
||||
*/
|
||||
if($rank->getLevel() == 3) {
|
||||
$player->setRank($rank);
|
||||
}
|
||||
|
@@ -19,6 +19,9 @@ $guilds_list->orderBy("name");
|
||||
$guilds = array();
|
||||
if(count($guilds_list) > 0)
|
||||
{
|
||||
/**
|
||||
* @var OTS_Guild $guild
|
||||
*/
|
||||
foreach ($guilds_list as $guild) {
|
||||
$guild_logo = $guild->getCustomField('logo_name');
|
||||
if (empty($guild_logo) || !file_exists(GUILD_IMAGES_DIR . $guild_logo))
|
||||
|
@@ -147,7 +147,7 @@ if ($cache->enabled()) {
|
||||
}
|
||||
|
||||
$offset = ($page - 1) * $configHighscoresPerPage;
|
||||
$query->join('accounts', 'accounts.id', '=', 'players.account_id')
|
||||
$query->join('accounts', 'accounts.id', '=', 'players.account_id') /** @phpstan-ignore-line */
|
||||
->withOnlineStatus()
|
||||
->whereNotIn('players.id', setting('core.highscores_ids_hidden'))
|
||||
->notDeleted()
|
||||
@@ -203,8 +203,8 @@ if (empty($highscores)) {
|
||||
|
||||
$highscores = $query->get()->map(function($row) {
|
||||
$tmp = $row->toArray();
|
||||
$tmp['online'] = $row->online_status;
|
||||
$tmp['vocation'] = $row->vocation_name;
|
||||
$tmp['online'] = $row->online_status; /** @phpstan-ignore-line */
|
||||
$tmp['vocation'] = $row->vocation_name; /** @phpstan-ignore-line */
|
||||
unset($tmp['online_table']);
|
||||
|
||||
return $tmp;
|
||||
|
Reference in New Issue
Block a user