Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 988fab9

Browse files
authored
Add more separate rule toggles
1 parent e227ffd commit 988fab9

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

‎README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ parameters:
6666
booleansInConditions: false
6767
uselessCast: false
6868
requireParentConstructorCall: false
69-
disallowedConstructs: false
69+
disallowedBacktick: false
70+
disallowedEmpty: false
71+
disallowedImplicitArrayCreation: false
72+
disallowedShortTernary: false
7073
overwriteVariablesWithLoop: false
7174
closureUsesThis: false
7275
matchingInheritedMethodNames: false
7376
numericOperandsInArithmeticOperators: false
74-
strictCalls: false
77+
strictFunctionCalls: false
78+
dynamicCallOnStaticMethod: false
7579
switchConditionsMatchingType: false
7680
noVariableVariables: false
7781
strictArrayFilter: false

‎rules.neon

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ parameters:
2222
booleansInConditions: %strictRules.allRules%
2323
uselessCast: %strictRules.allRules%
2424
requireParentConstructorCall: %strictRules.allRules%
25-
disallowedConstructs: %strictRules.allRules%
25+
disallowedBacktick: %strictRules.allRules%
26+
disallowedEmpty: %strictRules.allRules%
27+
disallowedImplicitArrayCreation: %strictRules.allRules%
28+
disallowedShortTernary: %strictRules.allRules%
2629
overwriteVariablesWithLoop: %strictRules.allRules%
2730
closureUsesThis: %strictRules.allRules%
2831
matchingInheritedMethodNames: %strictRules.allRules%
2932
numericOperandsInArithmeticOperators: %strictRules.allRules%
30-
strictCalls: %strictRules.allRules%
33+
strictFunctionCalls: %strictRules.allRules%
34+
dynamicCallOnStaticMethod: %strictRules.allRules%
3135
switchConditionsMatchingType: %strictRules.allRules%
3236
noVariableVariables: %strictRules.allRules%
3337
strictArrayFilter: [%strictRules.allRules%, %featureToggles.bleedingEdge%]
@@ -39,12 +43,16 @@ parametersSchema:
3943
booleansInConditions: anyOf(bool(), arrayOf(bool()))
4044
uselessCast: anyOf(bool(), arrayOf(bool()))
4145
requireParentConstructorCall: anyOf(bool(), arrayOf(bool()))
42-
disallowedConstructs: anyOf(bool(), arrayOf(bool()))
46+
disallowedBacktick: anyOf(bool(), arrayOf(bool()))
47+
disallowedEmpty: anyOf(bool(), arrayOf(bool()))
48+
disallowedImplicitArrayCreation: anyOf(bool(), arrayOf(bool()))
49+
disallowedShortTernary: anyOf(bool(), arrayOf(bool()))
4350
overwriteVariablesWithLoop: anyOf(bool(), arrayOf(bool()))
4451
closureUsesThis: anyOf(bool(), arrayOf(bool()))
4552
matchingInheritedMethodNames: anyOf(bool(), arrayOf(bool()))
4653
numericOperandsInArithmeticOperators: anyOf(bool(), arrayOf(bool()))
47-
strictCalls: anyOf(bool(), arrayOf(bool()))
54+
strictFunctionCalls: anyOf(bool(), arrayOf(bool()))
55+
dynamicCallOnStaticMethod: anyOf(bool(), arrayOf(bool()))
4856
switchConditionsMatchingType: anyOf(bool(), arrayOf(bool()))
4957
noVariableVariables: anyOf(bool(), arrayOf(bool()))
5058
strictArrayFilter: anyOf(bool(), arrayOf(bool()))
@@ -70,13 +78,13 @@ conditionalTags:
7078
PHPStan\Rules\Classes\RequireParentConstructCallRule:
7179
phpstan.rules.rule: %strictRules.requireParentConstructorCall%
7280
PHPStan\Rules\DisallowedConstructs\DisallowedBacktickRule:
73-
phpstan.rules.rule: %strictRules.disallowedConstructs%
81+
phpstan.rules.rule: %strictRules.disallowedBacktick%
7482
PHPStan\Rules\DisallowedConstructs\DisallowedEmptyRule:
75-
phpstan.rules.rule: %strictRules.disallowedConstructs%
83+
phpstan.rules.rule: %strictRules.disallowedEmpty%
7684
PHPStan\Rules\DisallowedConstructs\DisallowedImplicitArrayCreationRule:
77-
phpstan.rules.rule: %strictRules.disallowedConstructs%
85+
phpstan.rules.rule: %strictRules.disallowedImplicitArrayCreation%
7886
PHPStan\Rules\DisallowedConstructs\DisallowedShortTernaryRule:
79-
phpstan.rules.rule: %strictRules.disallowedConstructs%
87+
phpstan.rules.rule: %strictRules.disallowedShortTernary%
8088
PHPStan\Rules\ForeachLoop\OverwriteVariablesWithForeachRule:
8189
phpstan.rules.rule: %strictRules.overwriteVariablesWithLoop%
8290
PHPStan\Rules\ForLoop\OverwriteVariablesWithForLoopInitRule:
@@ -108,11 +116,11 @@ conditionalTags:
108116
PHPStan\Rules\Operators\OperandsInArithmeticSubtractionRule:
109117
phpstan.rules.rule: %strictRules.numericOperandsInArithmeticOperators%
110118
PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsRule:
111-
phpstan.rules.rule: %strictRules.strictCalls%
119+
phpstan.rules.rule: %strictRules.dynamicCallOnStaticMethod%
112120
PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsCallableRule:
113-
phpstan.rules.rule: %strictRules.strictCalls%
121+
phpstan.rules.rule: %strictRules.dynamicCallOnStaticMethod%
114122
PHPStan\Rules\StrictCalls\StrictFunctionCallsRule:
115-
phpstan.rules.rule: %strictRules.strictCalls%
123+
phpstan.rules.rule: %strictRules.strictFunctionCalls%
116124
PHPStan\Rules\SwitchConditions\MatchingTypeInSwitchCaseConditionRule:
117125
phpstan.rules.rule: %strictRules.switchConditionsMatchingType%
118126
PHPStan\Rules\VariableVariables\VariableMethodCallRule:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /