1010use PhpParser \Node \Scalar \String_ ;
1111use PhpParser \Node \Stmt \Class_ ;
1212use PHPStan \Analyser \Scope ;
13- use PHPStan \Broker \ Broker ;
13+ use PHPStan \Reflection \ ReflectionProvider ;
1414use PHPStan \Rules \Rule ;
1515use PHPStan \Rules \RuleError ;
1616use PHPStan \Rules \RuleErrorBuilder ;
@@ -28,7 +28,7 @@ final class CoversClassExistsRule implements Rule
2828 /** @var bool[] */
2929 private array $ alreadyParsedDocComments = [];
3030
31- public function __construct (private Broker $ broker )
31+ public function __construct (private ReflectionProvider $ reflectionProvider )
3232 {
3333 }
3434
@@ -74,7 +74,7 @@ public function processNodeAttribute(Class_ $node, Scope $scope): array
7474 assert ($ arg ->value ->class instanceof Name);
7575
7676 $ className = (string ) $ arg ->value ->class ;
77- if ($ this ->broker ->hasClass ($ className )) {
77+ if ($ this ->reflectionProvider ->hasClass ($ className )) {
7878 continue ;
7979 }
8080
@@ -85,7 +85,7 @@ public function processNodeAttribute(Class_ $node, Scope $scope): array
8585
8686 if ($ arg ->value instanceof String_) {
8787 $ className = (string ) $ arg ->value ->value ;
88- if ($ this ->broker ->hasClass ($ className )) {
88+ if ($ this ->reflectionProvider ->hasClass ($ className )) {
8989 continue ;
9090 }
9191
@@ -135,7 +135,7 @@ public function processNodeAnnotation(Class_ $node, Scope $scope): array
135135 }
136136 }
137137
138- if ($ this ->broker ->hasClass ($ matches ['className ' ])) {
138+ if ($ this ->reflectionProvider ->hasClass ($ matches ['className ' ])) {
139139 continue ;
140140 }
141141
0 commit comments