Update to PHPStan 2.x

This commit is contained in:
Dylan K. Taylor
2025-01-07 22:34:43 +00:00
parent d25ec58a6f
commit 9633b7d8a7
18 changed files with 876 additions and 344 deletions

View File

@ -1,22 +1,32 @@
parameters:
ignoreErrors:
-
message: "#^Cannot call method collectGarbage\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
message: '#^Cannot call method collectGarbage\(\) on pocketmine\\world\\format\\SubChunk\|null\.$#'
identifier: method.nonObject
count: 1
path: ../../../src/world/format/Chunk.php
-
message: "#^Method pocketmine\\\\world\\\\format\\\\Chunk\\:\\:getSubChunks\\(\\) should return array\\<int, pocketmine\\\\world\\\\format\\\\SubChunk\\> but returns array\\<int, pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\>\\.$#"
message: '#^Method pocketmine\\world\\format\\Chunk\:\:getSubChunks\(\) should return array\<int, pocketmine\\world\\format\\SubChunk\> but returns array\<int, pocketmine\\world\\format\\SubChunk\|null\>\.$#'
identifier: return.type
count: 1
path: ../../../src/world/format/Chunk.php
-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\)\\: mixed\\)\\|null, Closure\\(pocketmine\\\\world\\\\format\\\\SubChunk\\)\\: pocketmine\\\\world\\\\format\\\\SubChunk given\\.$#"
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(pocketmine\\world\\format\\SubChunk\|null\)\: mixed\)\|null, Closure\(pocketmine\\world\\format\\SubChunk\)\: pocketmine\\world\\format\\SubChunk given\.$#'
identifier: argument.type
count: 1
path: ../../../src/world/format/Chunk.php
-
message: "#^Method pocketmine\\\\world\\\\format\\\\HeightArray\\:\\:getValues\\(\\) should return non\\-empty\\-array\\<int, int\\> but returns array\\<int, int\\|null\\>\\.$#"
message: '#^Method pocketmine\\world\\format\\HeightArray\:\:getValues\(\) should return non\-empty\-list\<int\> but returns array\<int, int\|null\>\.$#'
identifier: return.type
count: 1
path: ../../../src/world/format/HeightArray.php
-
message: '#^Offset int might not exist on SplFixedArray\<float\>\|null\.$#'
identifier: offsetAccess.notFound
count: 4
path: ../../../src/world/generator/noise/Noise.php