phpstan: run static analysis on tests

This commit is contained in:
Dylan K. Taylor 2020-02-06 13:13:12 +00:00
parent 532dc0fb6f
commit 7885b54824
3 changed files with 13 additions and 0 deletions

View File

@ -2,7 +2,9 @@ includes:
- tests/phpstan/configs/com-dotnet-magic.neon
- tests/phpstan/configs/custom-leveldb.neon
- tests/phpstan/configs/gc-hacks.neon
- tests/phpstan/configs/php-bugs.neon
- tests/phpstan/configs/phpstan-bugs.neon
- tests/phpstan/configs/phpunit-wiring-tests.neon
- tests/phpstan/configs/pthreads-bugs.neon
- tests/phpstan/configs/runtime-type-checks.neon
@ -13,10 +15,12 @@ parameters:
- src/pocketmine/PocketMine.php
- build/make-release.php
- build/server-phar.php
- vendor/irstea/phpunit-shim/phpunit
paths:
- src
- build/make-release.php
- build/server-phar.php
- tests/phpunit
dynamicConstantNames:
- pocketmine\IS_DEVELOPMENT_BUILD
- pocketmine\DEBUG

View File

@ -0,0 +1,3 @@
parameters:
ignoreErrors:
- "#^Method ReflectionMethod\\:\\:getClosure\\(\\) invoked with 0 parameters, 1 required\\.$#"

View File

@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$class of static method pocketmine\\\\level\\\\format\\\\io\\\\LevelProviderManager\\:\\:addProvider\\(\\) expects class\\-string\\<pocketmine\\\\level\\\\format\\\\io\\\\LevelProvider\\>, string given\\.$#"
count: 2
path: ../../phpunit/level/format/io/LevelProviderManagerTest.php