10
10
use PhpParser \Node \Scalar \String_ ;
11
11
use PhpParser \Node \Stmt \Class_ ;
12
12
use PHPStan \Analyser \Scope ;
13
- use PHPStan \Broker \ Broker ;
13
+ use PHPStan \Reflection \ ReflectionProvider ;
14
14
use PHPStan \Rules \Rule ;
15
15
use PHPStan \Rules \RuleError ;
16
16
use PHPStan \Rules \RuleErrorBuilder ;
@@ -28,7 +28,7 @@ final class CoversClassExistsRule implements Rule
28
28
/** @var bool[] */
29
29
private array $ alreadyParsedDocComments = [];
30
30
31
- public function __construct (private Broker $ broker )
31
+ public function __construct (private ReflectionProvider $ reflectionProvider )
32
32
{
33
33
}
34
34
@@ -74,7 +74,7 @@ public function processNodeAttribute(Class_ $node, Scope $scope): array
74
74
assert ($ arg ->value ->class instanceof Name);
75
75
76
76
$ className = (string ) $ arg ->value ->class ;
77
- if ($ this ->broker ->hasClass ($ className )) {
77
+ if ($ this ->reflectionProvider ->hasClass ($ className )) {
78
78
continue ;
79
79
}
80
80
@@ -85,7 +85,7 @@ public function processNodeAttribute(Class_ $node, Scope $scope): array
85
85
86
86
if ($ arg ->value instanceof String_) {
87
87
$ className = (string ) $ arg ->value ->value ;
88
- if ($ this ->broker ->hasClass ($ className )) {
88
+ if ($ this ->reflectionProvider ->hasClass ($ className )) {
89
89
continue ;
90
90
}
91
91
@@ -135,7 +135,7 @@ public function processNodeAnnotation(Class_ $node, Scope $scope): array
135
135
}
136
136
}
137
137
138
- if ($ this ->broker ->hasClass ($ matches ['className ' ])) {
138
+ if ($ this ->reflectionProvider ->hasClass ($ matches ['className ' ])) {
139
139
continue ;
140
140
}
141
141
0 commit comments