phpstan: properly fixing FPs on constant comparisons

This commit is contained in:
Dylan K. Taylor 2019-12-29 14:25:44 +00:00
parent dadc5c1b87
commit 3e23a568ca
2 changed files with 3 additions and 22 deletions

View File

@ -1,5 +1,4 @@
includes:
- tests/phpstan/configs/debug-const-checks.neon
- tests/phpstan/configs/gc-hacks.neon
- tests/phpstan/configs/optional-com-dotnet.neon
- tests/phpstan/configs/optional-leveldb.neon
@ -14,6 +13,9 @@ parameters:
- src/pocketmine/PocketMine.php
paths:
- src
dynamicConstantNames:
- pocketmine\IS_DEVELOPMENT_BUILD
- pocketmine\DEBUG
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
ignoreErrors:
-

View File

@ -1,21 +0,0 @@
parameters:
ignoreErrors:
-
message: "#^If condition is always true\\.$#"
count: 1
path: ../../../src/pocketmine/Server.php
-
message: "#^Ternary operator condition is always true\\.$#"
count: 1
path: ../../../src/pocketmine/Server.php
-
message: "#^If condition is always false\\.$#"
count: 1
path: ../../../src/pocketmine/updater/AutoUpdater.php
-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
path: ../../../src/pocketmine/updater/AutoUpdater.php