mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
tools: fix PHPStan 2.0 issues
This commit is contained in:
@ -523,10 +523,12 @@ function processRemappedStates(array $upgradeTable) : array{
|
||||
}
|
||||
}
|
||||
}
|
||||
$orderedUnchanged = [];
|
||||
foreach(Utils::stringifyKeys($unchangedStatesByNewName) as $newName => $unchangedStates){
|
||||
ksort($unchangedStates);
|
||||
$unchangedStatesByNewName[$newName] = $unchangedStates;
|
||||
sort($unchangedStates);
|
||||
$orderedUnchanged[$newName] = $unchangedStates;
|
||||
}
|
||||
$unchangedStatesByNewName = $orderedUnchanged;
|
||||
|
||||
$notFlattenedProperties = [];
|
||||
|
||||
@ -656,7 +658,8 @@ function processRemappedStates(array $upgradeTable) : array{
|
||||
usort($list, function(BlockStateUpgradeSchemaBlockRemap $a, BlockStateUpgradeSchemaBlockRemap $b) : int{
|
||||
return count($b->oldState) <=> count($a->oldState);
|
||||
});
|
||||
return array_values($list);
|
||||
//usort discards keys, so this is already a list<BlockStateUpgradeSchemaBlockRemap>
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user