File tree Expand file tree Collapse file tree 4 files changed +14
-22
lines changed
Expand file tree Collapse file tree 4 files changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -14,27 +14,5 @@ autowiredAttributeServices:
1414 level : 5
1515
1616services :
17- -
18- class : PHPStan\Rules\Functions\RandomIntParametersRule
19- arguments :
20- reportMaybes : %reportMaybes%
21- tags :
22- - phpstan.rules.rule
23-
24- -
25- class : PHPStan\Rules\Functions\ArrayFilterRule
26- arguments :
27- treatPhpDocTypesAsCertain : %treatPhpDocTypesAsCertain%
28- treatPhpDocTypesAsCertainTip : %tips.treatPhpDocTypesAsCertain%
29- tags :
30- - phpstan.rules.rule
31-
32- -
33- class : PHPStan\Rules\Functions\ArrayValuesRule
34- arguments :
35- treatPhpDocTypesAsCertain : %treatPhpDocTypesAsCertain%
36- treatPhpDocTypesAsCertainTip : %tips.treatPhpDocTypesAsCertain%
37- tags :
38- - phpstan.rules.rule
3917 -
4018 class : PHPStan\Rules\Functions\ParameterCastableToNumberRule
Original file line number Diff line number Diff line change 66use PhpParser \Node \Expr \FuncCall ;
77use PHPStan \Analyser \ArgumentsNormalizer ;
88use PHPStan \Analyser \Scope ;
9+ use PHPStan \DependencyInjection \AutowiredParameter ;
10+ use PHPStan \DependencyInjection \RegisteredRule ;
911use PHPStan \Reflection \ParametersAcceptorSelector ;
1012use PHPStan \Reflection \ReflectionProvider ;
1113use PHPStan \Rules \Rule ;
1820/**
1921 * @implements Rule<Node\Expr\FuncCall>
2022 */
23+ #[RegisteredRule(level: 5 )]
2124final class ArrayFilterRule implements Rule
2225{
2326
2427 public function __construct (
2528 private ReflectionProvider $ reflectionProvider ,
29+ #[AutowiredParameter]
2630 private bool $ treatPhpDocTypesAsCertain ,
31+ #[AutowiredParameter(ref: '%tips.treatPhpDocTypesAsCertain% ' )]
2732 private bool $ treatPhpDocTypesAsCertainTip ,
2833 )
2934 {
Original file line number Diff line number Diff line change 66use PhpParser \Node \Expr \FuncCall ;
77use PHPStan \Analyser \ArgumentsNormalizer ;
88use PHPStan \Analyser \Scope ;
9+ use PHPStan \DependencyInjection \AutowiredParameter ;
10+ use PHPStan \DependencyInjection \RegisteredRule ;
911use PHPStan \Reflection \ParametersAcceptorSelector ;
1012use PHPStan \Reflection \ReflectionProvider ;
1113use PHPStan \Rules \Rule ;
1719/**
1820 * @implements Rule<Node\Expr\FuncCall>
1921 */
22+ #[RegisteredRule(level: 5 )]
2023final class ArrayValuesRule implements Rule
2124{
2225
2326 public function __construct (
2427 private readonly ReflectionProvider $ reflectionProvider ,
28+ #[AutowiredParameter]
2529 private readonly bool $ treatPhpDocTypesAsCertain ,
30+ #[AutowiredParameter(ref: '%tips.treatPhpDocTypesAsCertain% ' )]
2631 private bool $ treatPhpDocTypesAsCertainTip ,
2732 )
2833 {
Original file line number Diff line number Diff line change 55use PhpParser \Node ;
66use PhpParser \Node \Expr \FuncCall ;
77use PHPStan \Analyser \Scope ;
8+ use PHPStan \DependencyInjection \AutowiredParameter ;
9+ use PHPStan \DependencyInjection \RegisteredRule ;
810use PHPStan \Php \PhpVersion ;
911use PHPStan \Reflection \ReflectionProvider ;
1012use PHPStan \Rules \Rule ;
1921/**
2022 * @implements Rule<Node\Expr\FuncCall>
2123 */
24+ #[RegisteredRule(level: 5 )]
2225final class RandomIntParametersRule implements Rule
2326{
2427
2528 public function __construct (
2629 private ReflectionProvider $ reflectionProvider ,
2730 private PhpVersion $ phpVersion ,
31+ #[AutowiredParameter]
2832 private bool $ reportMaybes ,
2933 )
3034 {
You can’t perform that action at this time.
0 commit comments