hyperf/phpstan.neon

94 lines
2.9 KiB
Plaintext
Raw Normal View History

2019-08-25 11:41:41 +08:00
# Magic behaviour with __get, __set, __call and __callStatic is not exactly static analyser-friendly :)
# Fortunately, You can ingore it by the following config.
#
2019-08-27 13:30:24 +08:00
rules:
- PHPStan\Rules\Arrays\DeadForeachRule
- PHPStan\Rules\Comparison\BooleanOrConstantConditionRule
- PHPStan\Rules\Comparison\ElseIfConstantConditionRule
- PHPStan\Rules\Comparison\IfConstantConditionRule
- PHPStan\Rules\Comparison\TernaryOperatorConstantConditionRule
2019-08-25 11:41:41 +08:00
parameters:
2019-08-26 14:50:53 +08:00
bootstrap: "bootstrap.php"
2019-08-27 13:30:24 +08:00
checkFunctionArgumentTypes: true
checkArgumentsPassedByReference: true
reportUnmatchedIgnoredErrors: false
2019-08-27 13:30:24 +08:00
featureToggles:
deadCatchesRule: false
noopRule: false
tooWideTypehints: false
unreachableStatement: false
2019-08-26 14:50:53 +08:00
ignoreErrors:
- "#will always evaluate to false#"
2019-08-25 11:41:41 +08:00
excludes_analyse:
2019-08-26 14:50:53 +08:00
- %currentWorkingDirectory%/src/*/tests/*
2019-08-27 13:30:24 +08:00
conditionalTags:
PHPStan\Rules\Exceptions\DeadCatchRule:
phpstan.rules.rule: %featureToggles.deadCatchesRule%
PHPStan\Rules\DeadCode\NoopRule:
phpstan.rules.rule: %featureToggles.noopRule%
PHPStan\Rules\DeadCode\UnreachableStatementRule:
phpstan.rules.rule: %featureToggles.unreachableStatement%
PHPStan\Rules\TooWideTypehints\TooWideClosureReturnTypehintRule:
phpstan.rules.rule: %featureToggles.tooWideTypehints%
PHPStan\Rules\TooWideTypehints\TooWideFunctionReturnTypehintRule:
phpstan.rules.rule: %featureToggles.tooWideTypehints%
PHPStan\Rules\TooWideTypehints\TooWidePrivateMethodReturnTypehintRule:
phpstan.rules.rule: %featureToggles.tooWideTypehints%
services:
-
class: PHPStan\Rules\Classes\ImpossibleInstanceOfRule
arguments:
checkAlwaysTrueInstanceof: %checkAlwaysTrueInstanceof%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Comparison\ImpossibleCheckTypeFunctionCallRule
arguments:
checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Comparison\ImpossibleCheckTypeMethodCallRule
arguments:
checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Comparison\ImpossibleCheckTypeStaticMethodCallRule
arguments:
checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Comparison\StrictComparisonOfDifferentTypesRule
arguments:
checkAlwaysTrueStrictComparison: %checkAlwaysTrueStrictComparison%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Exceptions\DeadCatchRule
-
class: PHPStan\Rules\DeadCode\NoopRule
-
class: PHPStan\Rules\DeadCode\UnreachableStatementRule
-
class: PHPStan\Rules\TooWideTypehints\TooWideClosureReturnTypehintRule
-
class: PHPStan\Rules\TooWideTypehints\TooWideFunctionReturnTypehintRule
-
class: PHPStan\Rules\TooWideTypehints\TooWidePrivateMethodReturnTypehintRule