From 9509d7e04db45b33c25d8633666b083e3caaf34f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 20 May 2023 01:51:21 +0100 Subject: [PATCH] Scrub PHPStan baselines --- tests/phpstan/configs/actual-problems.neon | 25 ------------------ tests/phpstan/configs/phpstan-bugs.neon | 30 ---------------------- 2 files changed, 55 deletions(-) diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index acbfaef03..b3e0b4496 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -440,11 +440,6 @@ parameters: count: 3 path: ../../../src/block/tile/Spawnable.php - - - message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, string\\|null given\\.$#" - count: 1 - path: ../../../src/command/Command.php - - message: "#^Cannot call method addParticle\\(\\) on pocketmine\\\\world\\\\World\\|null\\.$#" count: 1 @@ -800,31 +795,11 @@ parameters: count: 1 path: ../../../src/resourcepacks/ZippedResourcePack.php - - - message: "#^Cannot call method getNotifier\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#" - count: 1 - path: ../../../src/scheduler/AsyncTask.php - - - - message: "#^Cannot call method handleException\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#" - count: 1 - path: ../../../src/scheduler/AsyncTask.php - - message: "#^Property pocketmine\\\\scheduler\\\\BulkCurlTask\\:\\:\\$operations \\(string\\) does not accept string\\|null\\.$#" count: 1 path: ../../../src/scheduler/BulkCurlTask.php - - - message: "#^Cannot call method getAsyncWorkerId\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#" - count: 1 - path: ../../../src/scheduler/DumpWorkerMemoryTask.php - - - - message: "#^Cannot call method getLogger\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#" - count: 1 - path: ../../../src/scheduler/DumpWorkerMemoryTask.php - - message: "#^Cannot call method getNextRun\\(\\) on array\\\\|int\\|pocketmine\\\\scheduler\\\\TaskHandler\\.$#" count: 1 diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index f45f9a643..42d682f68 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -5,11 +5,6 @@ parameters: count: 1 path: ../../../src/block/BaseBanner.php - - - message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#" - count: 1 - path: ../../../src/console/ConsoleCommandSender.php - - message: "#^Call to function assert\\(\\) with false and 'unknown hit type' will always evaluate to false\\.$#" count: 1 @@ -35,41 +30,16 @@ parameters: count: 1 path: ../../../src/network/mcpe/raklib/SnoozeAwarePthreadsChannelWriter.php - - - message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#" - count: 1 - path: ../../../src/player/Player.php - - message: "#^Dead catch \\- RuntimeException is never thrown in the try block\\.$#" count: 1 path: ../../../src/plugin/PluginManager.php - - - message: "#^Parameter \\#1 \\$work of method Worker\\:\\:stack\\(\\) expects Threaded, pocketmine\\\\scheduler\\\\AsyncTask given\\.$#" - count: 1 - path: ../../../src/scheduler/AsyncPool.php - - message: "#^Static property pocketmine\\\\scheduler\\\\AsyncTask\\:\\:\\$threadLocalStorage \\(ArrayObject\\\\>\\|null\\) does not accept non\\-empty\\-array\\\\>\\|ArrayObject\\\\>\\.$#" count: 1 path: ../../../src/scheduler/AsyncTask.php - - - message: "#^Property pocketmine\\\\thread\\\\Thread\\:\\:\\$classLoaders \\(ThreadedArray\\\\|null\\) does not accept array\\{ClassLoader\\}\\|ThreadedArray\\\\.$#" - count: 1 - path: ../../../src/thread/Thread.php - - - - message: "#^Property pocketmine\\\\thread\\\\Worker\\:\\:\\$classLoaders \\(ThreadedArray\\\\|null\\) does not accept array\\{ClassLoader\\}\\|ThreadedArray\\\\.$#" - count: 1 - path: ../../../src/thread/Worker.php - - - - message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#" - count: 2 - path: ../../../src/world/format/io/region/RegionLoader.php - - message: "#^Casting to int something that's already int\\.$#" count: 1