mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Fix PHPStan errors in monsters.php
This commit is contained in:
parent
da14e125e9
commit
28f98db9de
@ -29,6 +29,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\\_]+()#'
|
||||
- '#Call to an undefined method object::toArray\(\)#'
|
||||
# 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#'
|
||||
|
@ -44,6 +44,8 @@ $monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first(
|
||||
if ($monster && isset($monster->name)) {
|
||||
$monster = $monster->toArray();
|
||||
|
||||
/** @var array $monster */
|
||||
|
||||
function sort_by_chance($a, $b)
|
||||
{
|
||||
if ($a['chance'] == $b['chance']) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user