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:
14
14
level : 5
15
15
16
16
services :
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
39
17
-
40
18
class : PHPStan\Rules\Functions\ParameterCastableToNumberRule
Original file line number Diff line number Diff line change 6
6
use PhpParser \Node \Expr \FuncCall ;
7
7
use PHPStan \Analyser \ArgumentsNormalizer ;
8
8
use PHPStan \Analyser \Scope ;
9
+ use PHPStan \DependencyInjection \AutowiredParameter ;
10
+ use PHPStan \DependencyInjection \RegisteredRule ;
9
11
use PHPStan \Reflection \ParametersAcceptorSelector ;
10
12
use PHPStan \Reflection \ReflectionProvider ;
11
13
use PHPStan \Rules \Rule ;
18
20
/**
19
21
* @implements Rule<Node\Expr\FuncCall>
20
22
*/
23
+ #[RegisteredRule(level: 5 )]
21
24
final class ArrayFilterRule implements Rule
22
25
{
23
26
24
27
public function __construct (
25
28
private ReflectionProvider $ reflectionProvider ,
29
+ #[AutowiredParameter]
26
30
private bool $ treatPhpDocTypesAsCertain ,
31
+ #[AutowiredParameter(ref: '%tips.treatPhpDocTypesAsCertain% ' )]
27
32
private bool $ treatPhpDocTypesAsCertainTip ,
28
33
)
29
34
{
Original file line number Diff line number Diff line change 6
6
use PhpParser \Node \Expr \FuncCall ;
7
7
use PHPStan \Analyser \ArgumentsNormalizer ;
8
8
use PHPStan \Analyser \Scope ;
9
+ use PHPStan \DependencyInjection \AutowiredParameter ;
10
+ use PHPStan \DependencyInjection \RegisteredRule ;
9
11
use PHPStan \Reflection \ParametersAcceptorSelector ;
10
12
use PHPStan \Reflection \ReflectionProvider ;
11
13
use PHPStan \Rules \Rule ;
17
19
/**
18
20
* @implements Rule<Node\Expr\FuncCall>
19
21
*/
22
+ #[RegisteredRule(level: 5 )]
20
23
final class ArrayValuesRule implements Rule
21
24
{
22
25
23
26
public function __construct (
24
27
private readonly ReflectionProvider $ reflectionProvider ,
28
+ #[AutowiredParameter]
25
29
private readonly bool $ treatPhpDocTypesAsCertain ,
30
+ #[AutowiredParameter(ref: '%tips.treatPhpDocTypesAsCertain% ' )]
26
31
private bool $ treatPhpDocTypesAsCertainTip ,
27
32
)
28
33
{
Original file line number Diff line number Diff line change 5
5
use PhpParser \Node ;
6
6
use PhpParser \Node \Expr \FuncCall ;
7
7
use PHPStan \Analyser \Scope ;
8
+ use PHPStan \DependencyInjection \AutowiredParameter ;
9
+ use PHPStan \DependencyInjection \RegisteredRule ;
8
10
use PHPStan \Php \PhpVersion ;
9
11
use PHPStan \Reflection \ReflectionProvider ;
10
12
use PHPStan \Rules \Rule ;
19
21
/**
20
22
* @implements Rule<Node\Expr\FuncCall>
21
23
*/
24
+ #[RegisteredRule(level: 5 )]
22
25
final class RandomIntParametersRule implements Rule
23
26
{
24
27
25
28
public function __construct (
26
29
private ReflectionProvider $ reflectionProvider ,
27
30
private PhpVersion $ phpVersion ,
31
+ #[AutowiredParameter]
28
32
private bool $ reportMaybes ,
29
33
)
30
34
{
You can’t perform that action at this time.
0 commit comments