File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,6 @@ conditionalTags:
16
16
phpstan.rules.rule : %featureToggles.newStaticInAbstractClassStaticMethod%
17
17
18
18
services :
19
- -
20
- class : PHPStan\Rules\Classes\ClassConstantRule
21
-
22
19
-
23
20
class : PHPStan\Rules\Classes\NewStaticInAbstractClassStaticMethodRule
24
21
Original file line number Diff line number Diff line change 9
9
use PhpParser \Node \Scalar \String_ ;
10
10
use PHPStan \Analyser \NullsafeOperatorHelper ;
11
11
use PHPStan \Analyser \Scope ;
12
+ use PHPStan \DependencyInjection \AutowiredParameter ;
13
+ use PHPStan \DependencyInjection \AutowiredService ;
12
14
use PHPStan \DependencyInjection \RegisteredRule ;
13
15
use PHPStan \Internal \SprintfHelper ;
14
16
use PHPStan \Php \PhpVersion ;
34
36
/**
35
37
* @implements Rule<Node\Expr\ClassConstFetch>
36
38
*/
39
+ #[AutowiredService]
37
40
#[RegisteredRule(level: 0 )]
38
41
final class ClassConstantRule implements Rule
39
42
{
@@ -43,7 +46,8 @@ public function __construct(
43
46
private RuleLevelHelper $ ruleLevelHelper ,
44
47
private ClassNameCheck $ classCheck ,
45
48
private PhpVersion $ phpVersion ,
46
- private bool $ checkNonStringableDynamicAccess = true ,
49
+ #[AutowiredParameter(ref: '%featureToggles.checkNonStringableDynamicAccess% ' )]
50
+ private bool $ checkNonStringableDynamicAccess ,
47
51
)
48
52
{
49
53
}
You can’t perform that action at this time.
0 commit comments