2019-12-01 20:12:41 +00:00
|
|
|
includes:
|
2022-08-20 16:29:26 +01:00
|
|
|
- tests/phpstan/analyse-for-current-php-version.neon.php
|
2020-04-25 11:59:06 +01:00
|
|
|
- tests/phpstan/configs/actual-problems.neon
|
2021-01-27 20:04:13 +00:00
|
|
|
- tests/phpstan/configs/impossible-generics.neon
|
2020-02-06 13:13:12 +00:00
|
|
|
- tests/phpstan/configs/php-bugs.neon
|
2019-12-01 20:12:41 +00:00
|
|
|
- tests/phpstan/configs/phpstan-bugs.neon
|
2021-08-20 22:45:38 +01:00
|
|
|
- tests/phpstan/configs/spl-fixed-array-sucks.neon
|
2020-02-06 13:23:18 +00:00
|
|
|
- vendor/phpstan/phpstan-phpunit/extension.neon
|
|
|
|
- vendor/phpstan/phpstan-phpunit/rules.neon
|
2020-02-06 19:44:10 +00:00
|
|
|
- vendor/phpstan/phpstan-strict-rules/rules.neon
|
2019-11-05 11:16:49 +00:00
|
|
|
|
2020-01-09 17:54:52 +00:00
|
|
|
rules:
|
2025-03-09 00:51:12 +00:00
|
|
|
- pocketmine\phpstan\rules\DisallowDynamicNewRule
|
2023-08-08 17:08:13 +01:00
|
|
|
- pocketmine\phpstan\rules\DisallowForeachByReferenceRule
|
2025-03-04 20:44:01 +00:00
|
|
|
- pocketmine\phpstan\rules\ExplodeLimitRule
|
2021-11-15 22:52:05 +00:00
|
|
|
- pocketmine\phpstan\rules\UnsafeForeachArrayOfStringRule
|
2021-02-04 16:28:49 +00:00
|
|
|
# - pocketmine\phpstan\rules\ThreadedSupportedTypesRule
|
2020-01-09 17:54:52 +00:00
|
|
|
|
2019-11-05 11:16:49 +00:00
|
|
|
parameters:
|
2021-11-01 17:24:20 +00:00
|
|
|
level: 9
|
2021-01-24 20:27:53 +00:00
|
|
|
checkMissingCallableSignature: true
|
2025-01-08 02:04:06 +00:00
|
|
|
rememberPossiblyImpureFunctionValues: false #risky to remember these, better for performance to avoid repeated calls anyway
|
2021-05-02 13:55:32 +01:00
|
|
|
treatPhpDocTypesAsCertain: false
|
2020-06-14 19:57:36 +01:00
|
|
|
bootstrapFiles:
|
2019-11-07 18:22:21 +00:00
|
|
|
- tests/phpstan/bootstrap.php
|
2020-08-28 21:17:21 +01:00
|
|
|
scanDirectories:
|
2021-09-07 12:39:54 +01:00
|
|
|
- build
|
2021-08-29 23:19:35 +01:00
|
|
|
- tests/plugins/TesterPlugin
|
2021-08-29 23:31:24 +01:00
|
|
|
- tools
|
2020-06-14 19:57:36 +01:00
|
|
|
scanFiles:
|
2019-11-09 18:01:04 +00:00
|
|
|
- src/PocketMine.php
|
2019-11-05 11:16:49 +00:00
|
|
|
paths:
|
2021-09-07 12:39:54 +01:00
|
|
|
- build
|
2019-11-05 11:16:49 +00:00
|
|
|
- src
|
2025-01-07 22:34:43 +00:00
|
|
|
- tests/phpstan/DummyPluginOwned.php
|
2020-01-08 19:45:05 +00:00
|
|
|
- tests/phpstan/rules
|
2020-02-06 13:13:12 +00:00
|
|
|
- tests/phpunit
|
2020-08-28 21:17:21 +01:00
|
|
|
- tests/plugins/TesterPlugin
|
2021-08-29 23:31:24 +01:00
|
|
|
- tools
|
2021-09-07 12:39:54 +01:00
|
|
|
excludePaths:
|
|
|
|
analyseAndScan:
|
2021-10-05 00:14:21 +00:00
|
|
|
- build/php
|
2019-12-29 14:25:44 +00:00
|
|
|
dynamicConstantNames:
|
2020-07-25 19:00:48 +01:00
|
|
|
- pocketmine\VersionInfo::IS_DEVELOPMENT_BUILD
|
2024-10-31 13:52:15 +00:00
|
|
|
- pocketmine\VersionInfo::BUILD_CHANNEL
|
2019-12-29 14:25:44 +00:00
|
|
|
- pocketmine\DEBUG
|
2021-09-07 12:32:19 +01:00
|
|
|
- pocketmine\IS_DEVELOPMENT_BUILD
|
2020-01-30 22:31:15 +00:00
|
|
|
stubFiles:
|
2025-01-08 01:48:15 +00:00
|
|
|
- tests/phpstan/stubs/chunkutils2.stub
|
2020-03-23 21:58:12 +00:00
|
|
|
- tests/phpstan/stubs/JsonMapper.stub
|
2020-06-10 10:31:54 +01:00
|
|
|
- tests/phpstan/stubs/leveldb.stub
|
2023-05-20 01:29:26 +01:00
|
|
|
- tests/phpstan/stubs/pmmpthread.stub
|
2019-11-05 20:21:36 +00:00
|
|
|
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
|
2021-01-27 19:25:28 +00:00
|
|
|
typeAliases:
|
2021-08-29 23:19:35 +01:00
|
|
|
#variadics don't work for this - mixed probably shouldn't work either, but for now it does
|
|
|
|
#what we actually need is something that accepts an infinite number of parameters, but in the absence of that,
|
|
|
|
#we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway.
|
2021-10-09 19:33:43 +01:00
|
|
|
anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed'
|
|
|
|
anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed'
|