From 4bc2f28c6d954c339992c967ae24b6dcb853a859 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 2 Feb 2020 18:12:41 +0000 Subject: [PATCH] Provide a ChunkUtils stub for PHPStan, so it doesn't get confused when the extension is loaded for some reason the presence of the type problems were reported as problems on ChunkUtils.php, despite being outside of the project scope and the errors not applying to the polyfill. --- phpstan.neon.dist | 1 + tests/phpstan/stubs/chunkutils.stub | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/phpstan/stubs/chunkutils.stub diff --git a/phpstan.neon.dist b/phpstan.neon.dist index eefdd1de8..c5db920bf 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -20,6 +20,7 @@ parameters: - pocketmine\DEBUG stubFiles: - tests/phpstan/stubs/pthreads.stub + - tests/phpstan/stubs/chunkutils.stub reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings ignoreErrors: - diff --git a/tests/phpstan/stubs/chunkutils.stub b/tests/phpstan/stubs/chunkutils.stub new file mode 100644 index 000000000..245c6ae04 --- /dev/null +++ b/tests/phpstan/stubs/chunkutils.stub @@ -0,0 +1,26 @@ +