Skip to content

Commit 6bc08ba

Browse files
committed
Update extension config
1 parent 10e9e75 commit 6bc08ba

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

extension.neon

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ services:
1212
tags:
1313
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1414
parameters:
15+
dynamicConstantNames:
16+
- FOO
1517
strictRules:
18+
allRules: false
1619
disallowedLooseComparison: false
1720
booleansInConditions: false
1821
uselessCast: false
@@ -26,3 +29,23 @@ parameters:
2629
switchConditionsMatchingType: false
2730
noVariableVariables: false
2831
strictArrayFilter: false
32+
33+
# Add the schema from phpstan-strict-rules so it's available without loading the extension
34+
# and the above configuration works.
35+
parametersSchema:
36+
strictRules: structure([
37+
allRules: anyOf(bool(), arrayOf(bool())),
38+
disallowedLooseComparison: anyOf(bool(), arrayOf(bool())),
39+
booleansInConditions: anyOf(bool(), arrayOf(bool()))
40+
uselessCast: anyOf(bool(), arrayOf(bool()))
41+
requireParentConstructorCall: anyOf(bool(), arrayOf(bool()))
42+
disallowedConstructs: anyOf(bool(), arrayOf(bool()))
43+
overwriteVariablesWithLoop: anyOf(bool(), arrayOf(bool()))
44+
closureUsesThis: anyOf(bool(), arrayOf(bool()))
45+
matchingInheritedMethodNames: anyOf(bool(), arrayOf(bool()))
46+
numericOperandsInArithmeticOperators: anyOf(bool(), arrayOf(bool()))
47+
strictCalls: anyOf(bool(), arrayOf(bool()))
48+
switchConditionsMatchingType: anyOf(bool(), arrayOf(bool()))
49+
noVariableVariables: anyOf(bool(), arrayOf(bool()))
50+
strictArrayFilter: anyOf(bool(), arrayOf(bool()))
51+
])

0 commit comments

Comments
 (0)