mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Merge branch 'next-minor'
This commit is contained in:
21
tests/phpstan/configs/debug-const-checks.neon
Normal file
21
tests/phpstan/configs/debug-const-checks.neon
Normal file
@ -0,0 +1,21 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^If condition is always true\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Ternary operator condition is always true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^If condition is always false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/updater/AutoUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Negated boolean expression is always false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/updater/AutoUpdater.php
|
@ -26,22 +26,50 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/MemoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\>\\=\" between 0 and 2 is always false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/block/Liquid.php
|
||||
|
||||
-
|
||||
#adjacentSources comparison FP
|
||||
message: "#^If condition is always false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/block/Liquid.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on Ds\\\\Deque&iterable\\<pocketmine\\\\block\\\\utils\\\\BannerPattern\\>\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/block/tile/Banner.php
|
||||
|
||||
-
|
||||
message: "#^Call to function assert\\(\\) with false and 'unknown hit type' will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/projectile/Projectile.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset int on Ds\\\\Deque&iterable\\<pocketmine\\\\item\\\\WritableBookPage\\>\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/item/WritableBookBase.php
|
||||
|
||||
-
|
||||
message: "#^Array \\(array\\) does not accept key int\\.$#"
|
||||
message: "#^Instanceof between int and PharFileInfo will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginDescription.php
|
||||
path: ../../../src/plugin/PharPluginLoader.php
|
||||
|
||||
-
|
||||
message: "#^Array \\(array\\) does not accept key int\\.$#"
|
||||
#ReflectionFunction::getClosureThis() should be nullable
|
||||
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/format/SubChunk.php
|
||||
path: ../../../src/utils/Utils.php
|
||||
|
||||
-
|
||||
#ReflectionFunction::getClosureScopeClass() should be nullable
|
||||
message: "#^Unreachable statement \\- code above always terminates\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/utils/Utils.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between int\\<min, 3\\> and 4 will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/world/World.php
|
||||
|
13
tests/phpstan/configs/runtime-type-checks.neon
Normal file
13
tests/phpstan/configs/runtime-type-checks.neon
Normal file
@ -0,0 +1,13 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
#::add() / ::remove() thread parameter
|
||||
message: "#^If condition is always 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
|
@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.12.0/phpstan.phar
|
||||
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.12.2/phpstan.phar
|
||||
"$PHP_BINARY" phpstan.phar analyze --no-progress --memory-limit=2G || exit 1
|
||||
echo "PHPStan scan succeeded"
|
||||
|
||||
|
Reference in New Issue
Block a user