From 73420819f63121237d9d500c17e51f7236447fab Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 5 May 2021 14:51:39 +0100 Subject: [PATCH] Clean PHPStan baselines --- tests/phpstan/configs/actual-problems.neon | 5 --- tests/phpstan/configs/gc-hacks.neon | 5 --- tests/phpstan/configs/phpstan-bugs.neon | 7 +--- .../phpstan/configs/runtime-type-checks.neon | 42 +------------------ 4 files changed, 2 insertions(+), 57 deletions(-) diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index 82e6be24d..21c05e8af 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -30,11 +30,6 @@ parameters: count: 1 path: ../../../src/Server.php - - - message: "#^pocketmine\\\\block\\\\inventory\\\\DoubleChestInventory\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\block\\\\inventory\\\\ChestInventory\\.$#" - count: 1 - path: ../../../src/block/inventory/DoubleChestInventory.php - - message: "#^Property pocketmine\\\\event\\\\entity\\\\EntityShootBowEvent\\:\\:\\$projectile \\(pocketmine\\\\entity\\\\projectile\\\\Projectile\\) does not accept pocketmine\\\\entity\\\\Entity\\.$#" count: 1 diff --git a/tests/phpstan/configs/gc-hacks.neon b/tests/phpstan/configs/gc-hacks.neon index 357f0d73d..adf69ad5d 100644 --- a/tests/phpstan/configs/gc-hacks.neon +++ b/tests/phpstan/configs/gc-hacks.neon @@ -80,11 +80,6 @@ parameters: count: 1 path: ../../../src/player/Player.php - - - message: "#^Property pocketmine\\\\player\\\\Player\\:\\:\\$perm \\(pocketmine\\\\permission\\\\PermissibleBase\\) does not accept null\\.$#" - count: 1 - path: ../../../src/player/Player.php - - message: "#^Property pocketmine\\\\world\\\\World\\:\\:\\$provider \\(pocketmine\\\\world\\\\format\\\\io\\\\WritableWorldProvider\\) does not accept null\\.$#" count: 1 diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index 4828b333b..a5f9c1b6b 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -1,13 +1,8 @@ parameters: ignoreErrors: - - - message: "#^Strict comparison using \\!\\=\\= between 5 and 5 will always evaluate to false\\.$#" - count: 1 - path: ../../../src/block/Vine.php - - message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#" - count: 3 + count: 2 path: ../../../src/command/CommandReader.php - diff --git a/tests/phpstan/configs/runtime-type-checks.neon b/tests/phpstan/configs/runtime-type-checks.neon index 0c60ba55b..12e59f585 100644 --- a/tests/phpstan/configs/runtime-type-checks.neon +++ b/tests/phpstan/configs/runtime-type-checks.neon @@ -1,18 +1,8 @@ parameters: ignoreErrors: - - - message: "#^Instanceof between pocketmine\\\\event\\\\RegisteredListener and pocketmine\\\\event\\\\RegisteredListener will always evaluate to true\\.$#" - count: 1 - path: ../../../src/event/HandlerList.php - - - - message: "#^Call to function is_string\\(\\) with string will always evaluate to true\\.$#" - count: 1 - path: ../../../src/item/Item.php - - message: "#^Casting to int something that's already int\\.$#" - count: 3 + count: 2 path: ../../../src/item/Item.php - @@ -25,33 +15,3 @@ parameters: count: 1 path: ../../../src/plugin/PluginBase.php - - - message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\event\\\\\\\\Event' will always evaluate to true\\.$#" - count: 1 - path: ../../../src/plugin/PluginManager.php - - - - 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 - - - - message: "#^Call to function is_object\\(\\) with \\*NEVER\\* will always evaluate to true\\.$#" - count: 1 - path: ../../../src/world/World.php - - - - 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 -