mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-02 12:19:20 +02:00
Move errors ignoring into phpstan.neon
This commit is contained in:
parent
42ce80170e
commit
765baf248f
@ -30,4 +30,7 @@ parameters:
|
|||||||
- '#Variable \$[a-zA-Z0-9\\_]+ might not be defined#'
|
- '#Variable \$[a-zA-Z0-9\\_]+ might not be defined#'
|
||||||
# Eloquent models
|
# Eloquent models
|
||||||
- '#Call to an undefined static method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+()#'
|
- '#Call to an undefined static method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+()#'
|
||||||
|
# system/pages/highscores.php
|
||||||
|
- '#Call to an undefined method Illuminate\\Database\\Query\\Builder::withOnlineStatus\(\)#'
|
||||||
|
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$online_status#'
|
||||||
|
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$vocation_name#'
|
||||||
|
@ -1111,7 +1111,7 @@ function getTopPlayers($limit = 5) {
|
|||||||
$columns[] = 'online';
|
$columns[] = 'online';
|
||||||
}
|
}
|
||||||
|
|
||||||
$players = Player::query()/** @phpstan-ignore-line */
|
$players = Player::query()
|
||||||
->select($columns)
|
->select($columns)
|
||||||
->withOnlineStatus()
|
->withOnlineStatus()
|
||||||
->notDeleted()
|
->notDeleted()
|
||||||
|
@ -147,7 +147,7 @@ if ($cache->enabled()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$offset = ($page - 1) * $configHighscoresPerPage;
|
$offset = ($page - 1) * $configHighscoresPerPage;
|
||||||
$query->join('accounts', 'accounts.id', '=', 'players.account_id') /** @phpstan-ignore-line */
|
$query->join('accounts', 'accounts.id', '=', 'players.account_id')
|
||||||
->withOnlineStatus()
|
->withOnlineStatus()
|
||||||
->whereNotIn('players.id', setting('core.highscores_ids_hidden'))
|
->whereNotIn('players.id', setting('core.highscores_ids_hidden'))
|
||||||
->notDeleted()
|
->notDeleted()
|
||||||
@ -203,8 +203,8 @@ if (empty($highscores)) {
|
|||||||
|
|
||||||
$highscores = $query->get()->map(function($row) {
|
$highscores = $query->get()->map(function($row) {
|
||||||
$tmp = $row->toArray();
|
$tmp = $row->toArray();
|
||||||
$tmp['online'] = $row->online_status; /** @phpstan-ignore-line */
|
$tmp['online'] = $row->online_status;
|
||||||
$tmp['vocation'] = $row->vocation_name; /** @phpstan-ignore-line */
|
$tmp['vocation'] = $row->vocation_name;
|
||||||
unset($tmp['online_table']);
|
unset($tmp['online_table']);
|
||||||
|
|
||||||
return $tmp;
|
return $tmp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user