mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Merge branch 'stable'
This commit is contained in:
3
tests/phpstan/configs/php-bugs.neon
Normal file
3
tests/phpstan/configs/php-bugs.neon
Normal file
@ -0,0 +1,3 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
- "#^Method ReflectionMethod\\:\\:getClosure\\(\\) invoked with 0 parameters, 1 required\\.$#"
|
@ -1,17 +1,10 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
- "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
||||
-
|
||||
message: "#^Default value of the parameter \\#\\d+ \\$[A-Za-z\\d_]+ \\(\\-?\\d+\\) of method .+\\(\\) is incompatible with type float\\.$#"
|
||||
path: ../../../src
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on Threaded\\.$#"
|
||||
path: ../../../src
|
||||
|
||||
-
|
||||
message: "#^Cannot assign new offset to Threaded\\.$#"
|
||||
path: ../../../src
|
||||
|
||||
-
|
||||
message: "#^Offset string does not exist on array\\(\\)\\.$#"
|
||||
count: 3
|
||||
@ -39,6 +32,12 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/block/Liquid.php
|
||||
|
||||
-
|
||||
#readline() may return false
|
||||
message: "#^Strict comparison using \\!\\=\\= between string and false will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/command/CommandReader.php
|
||||
|
||||
-
|
||||
message: "#^Call to function assert\\(\\) with false and 'unknown hit type' will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
@ -65,3 +64,9 @@ parameters:
|
||||
message: "#^If condition is always false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/protocol/types/entity/EntityMetadataCollection.php
|
||||
|
||||
-
|
||||
#phpstan doesn't understand that SplFixedArray may contain null
|
||||
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with int and string will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../tests/phpunit/block/BlockTest.php
|
||||
|
6
tests/phpstan/configs/phpunit-wiring-tests.neon
Normal file
6
tests/phpstan/configs/phpunit-wiring-tests.neon
Normal file
@ -0,0 +1,6 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$class of static method pocketmine\\\\world\\\\format\\\\io\\\\WorldProviderManager\\:\\:addProvider\\(\\) expects class\\-string\\<pocketmine\\\\world\\\\format\\\\io\\\\WorldProvider\\>, string given\\.$#"
|
||||
count: 2
|
||||
path: ../../phpunit/world/format/io/LevelProviderManagerTest.php
|
@ -1,13 +1,50 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Instanceof between pocketmine\\\\event\\\\RegisteredListener and pocketmine\\\\event\\\\RegisteredListener will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/event/HandlerList.php
|
||||
|
||||
-
|
||||
#jsonDeserialize(), not currently validated
|
||||
message: "#^Casting to int something that's already int\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/item/Item.php
|
||||
|
||||
-
|
||||
#commands plugin.yml not currently validated, can't be sure
|
||||
message: "#^Call to function is_array\\(\\) with array\\<string, mixed\\> will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginBase.php
|
||||
|
||||
-
|
||||
#::add() / ::remove() thread parameter
|
||||
message: "#^If condition is always true\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/thread/ThreadManager.php
|
||||
|
||||
-
|
||||
message: "#^Instanceof between pocketmine\\\\thread\\\\Worker and pocketmine\\\\thread\\\\Worker will always evaluate to true\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/thread/ThreadManager.php
|
||||
|
||||
-
|
||||
#->sendBlocks() blocks parameter
|
||||
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/World.php
|
||||
|
||||
-
|
||||
message: "#^Instanceof between pocketmine\\\\math\\\\Vector3 and pocketmine\\\\math\\\\Vector3 will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/World.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_object\\(\\) with \\*NEVER\\* will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/World.php
|
||||
|
||||
-
|
||||
message: "#^Call to function assert\\(\\) with bool will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/World.php
|
||||
|
Reference in New Issue
Block a user