phpstan 1.4.8

This commit is contained in:
Dylan K. Taylor
2022-03-09 18:30:54 +00:00
parent b6e7ad187a
commit 8efa299c65
5 changed files with 60 additions and 30 deletions

View File

@ -435,11 +435,6 @@ parameters:
count: 3
path: ../../../src/block/tile/Spawnable.php
-
message: "#^Array \\(array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, string\\>\\) does not accept string\\|false\\.$#"
count: 1
path: ../../../src/block/tile/TileFactory.php
-
message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, string\\|null given\\.$#"
count: 1
@ -765,14 +760,9 @@ parameters:
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Array \\(array\\<string\\>\\) does not accept mixed\\.$#"
count: 2
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Cannot cast mixed to string\\.$#"
count: 4
count: 5
path: ../../../src/plugin/PluginDescription.php
-
@ -800,6 +790,16 @@ parameters:
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$authors \\(array\\<string\\>\\) does not accept array\\.$#"
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$authors \\(array\\<string\\>\\) does not accept array\\<mixed\\>\\.$#"
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$depend \\(array\\<string\\>\\) does not accept array\\.$#"
count: 1
@ -860,11 +860,6 @@ parameters:
count: 1
path: ../../../src/resourcepacks/ZippedResourcePack.php
-
message: "#^Cannot call method count\\(\\) on ArrayObject\\<int, array\\<string, mixed\\>\\>\\|null\\.$#"
count: 1
path: ../../../src/scheduler/AsyncTask.php
-
message: "#^Cannot call method getNotifier\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#"
count: 1

View File

@ -5,6 +5,11 @@ parameters:
count: 1
path: ../../../src/block/BaseBanner.php
-
message: "#^Property pocketmine\\\\block\\\\tile\\\\TileFactory\\:\\:\\$saveNames \\(array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, string\\>\\) does not accept array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, bool\\|string\\>\\.$#"
count: 1
path: ../../../src/block/tile/TileFactory.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
@ -25,6 +30,26 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Match arm comparison between 4 and 4 is always true\\.$#"
count: 1
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
-
message: "#^Match arm is unreachable because previous comparison is always true\\.$#"
count: 1
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
-
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\PthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#"
count: 1
path: ../../../src/network/mcpe/raklib/PthreadsChannelWriter.php
-
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\SnoozeAwarePthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#"
count: 1
path: ../../../src/network/mcpe/raklib/SnoozeAwarePthreadsChannelWriter.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
@ -36,14 +61,19 @@ parameters:
path: ../../../src/plugin/PluginManager.php
-
message: "#^Parameter \\#1 \\$closure of static method pocketmine\\\\utils\\\\Utils\\:\\:getNiceClosureName\\(\\) expects Closure\\(\\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*\\)\\: mixed, Closure\\(TEvent of pocketmine\\\\event\\\\Event\\)\\: void given\\.$#"
message: "#^Static property pocketmine\\\\scheduler\\\\AsyncTask\\:\\:\\$threadLocalStorage \\(ArrayObject\\<int, array\\<string, mixed\\>\\>\\|null\\) does not accept non\\-empty\\-array\\<int, non\\-empty\\-array\\<string, mixed\\>\\>\\|ArrayObject\\<int, array\\<string, mixed\\>\\>\\.$#"
count: 1
path: ../../../src/plugin/PluginManager.php
path: ../../../src/scheduler/AsyncTask.php
-
message: "#^Parameter \\#1 \\$yamlString of class pocketmine\\\\plugin\\\\PluginDescription constructor expects array\\|string, array\\<string\\> given\\.$#"
message: "#^Property pocketmine\\\\thread\\\\Thread\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
count: 1
path: ../../../src/plugin/ScriptPluginLoader.php
path: ../../../src/thread/Thread.php
-
message: "#^Property pocketmine\\\\thread\\\\Worker\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
count: 1
path: ../../../src/thread/Worker.php
-
message: "#^Dead catch \\- JsonException is never thrown in the try block\\.$#"
@ -55,3 +85,8 @@ parameters:
count: 2
path: ../../../src/world/format/io/region/RegionLoader.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotSame\\(\\) with arguments stdClass, stdClass and 'Cloning registry…' will always evaluate to false\\.$#"
count: 1
path: ../../phpunit/utils/CloningRegistryTraitTest.php