mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-01 19:59:21 +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#'
|
||||
# Eloquent models
|
||||
- '#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';
|
||||
}
|
||||
|
||||
$players = Player::query()/** @phpstan-ignore-line */
|
||||
$players = Player::query()
|
||||
->select($columns)
|
||||
->withOnlineStatus()
|
||||
->notDeleted()
|
||||
|
@ -147,7 +147,7 @@ if ($cache->enabled()) {
|
||||
}
|
||||
|
||||
$offset = ($page - 1) * $configHighscoresPerPage;
|
||||
$query->join('accounts', 'accounts.id', '=', 'players.account_id') /** @phpstan-ignore-line */
|
||||
$query->join('accounts', 'accounts.id', '=', 'players.account_id')
|
||||
->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; /** @phpstan-ignore-line */
|
||||
$tmp['vocation'] = $row->vocation_name; /** @phpstan-ignore-line */
|
||||
$tmp['online'] = $row->online_status;
|
||||
$tmp['vocation'] = $row->vocation_name;
|
||||
unset($tmp['online_table']);
|
||||
|
||||
return $tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user