Skip to content

Commit

Permalink
Add more separate rule toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk authored Sep 24, 2024
1 parent e227ffd commit 988fab9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@ parameters:
booleansInConditions: false
uselessCast: false
requireParentConstructorCall: false
disallowedConstructs: false
disallowedBacktick: false
disallowedEmpty: false
disallowedImplicitArrayCreation: false
disallowedShortTernary: false
overwriteVariablesWithLoop: false
closureUsesThis: false
matchingInheritedMethodNames: false
numericOperandsInArithmeticOperators: false
strictCalls: false
strictFunctionCalls: false
dynamicCallOnStaticMethod: false
switchConditionsMatchingType: false
noVariableVariables: false
strictArrayFilter: false
Expand Down
30 changes: 19 additions & 11 deletions rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ parameters:
booleansInConditions: %strictRules.allRules%
uselessCast: %strictRules.allRules%
requireParentConstructorCall: %strictRules.allRules%
disallowedConstructs: %strictRules.allRules%
disallowedBacktick: %strictRules.allRules%
disallowedEmpty: %strictRules.allRules%
disallowedImplicitArrayCreation: %strictRules.allRules%
disallowedShortTernary: %strictRules.allRules%
overwriteVariablesWithLoop: %strictRules.allRules%
closureUsesThis: %strictRules.allRules%
matchingInheritedMethodNames: %strictRules.allRules%
numericOperandsInArithmeticOperators: %strictRules.allRules%
strictCalls: %strictRules.allRules%
strictFunctionCalls: %strictRules.allRules%
dynamicCallOnStaticMethod: %strictRules.allRules%
switchConditionsMatchingType: %strictRules.allRules%
noVariableVariables: %strictRules.allRules%
strictArrayFilter: [%strictRules.allRules%, %featureToggles.bleedingEdge%]
Expand All @@ -39,12 +43,16 @@ parametersSchema:
booleansInConditions: anyOf(bool(), arrayOf(bool()))
uselessCast: anyOf(bool(), arrayOf(bool()))
requireParentConstructorCall: anyOf(bool(), arrayOf(bool()))
disallowedConstructs: anyOf(bool(), arrayOf(bool()))
disallowedBacktick: anyOf(bool(), arrayOf(bool()))
disallowedEmpty: anyOf(bool(), arrayOf(bool()))
disallowedImplicitArrayCreation: anyOf(bool(), arrayOf(bool()))
disallowedShortTernary: anyOf(bool(), arrayOf(bool()))
overwriteVariablesWithLoop: anyOf(bool(), arrayOf(bool()))
closureUsesThis: anyOf(bool(), arrayOf(bool()))
matchingInheritedMethodNames: anyOf(bool(), arrayOf(bool()))
numericOperandsInArithmeticOperators: anyOf(bool(), arrayOf(bool()))
strictCalls: anyOf(bool(), arrayOf(bool()))
strictFunctionCalls: anyOf(bool(), arrayOf(bool()))
dynamicCallOnStaticMethod: anyOf(bool(), arrayOf(bool()))
switchConditionsMatchingType: anyOf(bool(), arrayOf(bool()))
noVariableVariables: anyOf(bool(), arrayOf(bool()))
strictArrayFilter: anyOf(bool(), arrayOf(bool()))
Expand All @@ -70,13 +78,13 @@ conditionalTags:
PHPStan\Rules\Classes\RequireParentConstructCallRule:
phpstan.rules.rule: %strictRules.requireParentConstructorCall%
PHPStan\Rules\DisallowedConstructs\DisallowedBacktickRule:
phpstan.rules.rule: %strictRules.disallowedConstructs%
phpstan.rules.rule: %strictRules.disallowedBacktick%
PHPStan\Rules\DisallowedConstructs\DisallowedEmptyRule:
phpstan.rules.rule: %strictRules.disallowedConstructs%
phpstan.rules.rule: %strictRules.disallowedEmpty%
PHPStan\Rules\DisallowedConstructs\DisallowedImplicitArrayCreationRule:
phpstan.rules.rule: %strictRules.disallowedConstructs%
phpstan.rules.rule: %strictRules.disallowedImplicitArrayCreation%
PHPStan\Rules\DisallowedConstructs\DisallowedShortTernaryRule:
phpstan.rules.rule: %strictRules.disallowedConstructs%
phpstan.rules.rule: %strictRules.disallowedShortTernary%
PHPStan\Rules\ForeachLoop\OverwriteVariablesWithForeachRule:
phpstan.rules.rule: %strictRules.overwriteVariablesWithLoop%
PHPStan\Rules\ForLoop\OverwriteVariablesWithForLoopInitRule:
Expand Down Expand Up @@ -108,11 +116,11 @@ conditionalTags:
PHPStan\Rules\Operators\OperandsInArithmeticSubtractionRule:
phpstan.rules.rule: %strictRules.numericOperandsInArithmeticOperators%
PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsRule:
phpstan.rules.rule: %strictRules.strictCalls%
phpstan.rules.rule: %strictRules.dynamicCallOnStaticMethod%
PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsCallableRule:
phpstan.rules.rule: %strictRules.strictCalls%
phpstan.rules.rule: %strictRules.dynamicCallOnStaticMethod%
PHPStan\Rules\StrictCalls\StrictFunctionCallsRule:
phpstan.rules.rule: %strictRules.strictCalls%
phpstan.rules.rule: %strictRules.strictFunctionCalls%
PHPStan\Rules\SwitchConditions\MatchingTypeInSwitchCaseConditionRule:
phpstan.rules.rule: %strictRules.switchConditionsMatchingType%
PHPStan\Rules\VariableVariables\VariableMethodCallRule:
Expand Down

0 comments on commit 988fab9

Please sign in to comment.