5
5
use PhpParser \Node ;
6
6
use PhpParser \Node \Stmt \Class_ ;
7
7
use PHPStan \Analyser \Scope ;
8
- use PHPStan \Broker \ Broker ;
8
+ use PHPStan \Reflection \ ReflectionProvider ;
9
9
10
10
/**
11
11
* @implements \PHPStan\Rules\Rule<Class_>
12
12
*/
13
13
class ImplementationOfDeprecatedInterfaceRule implements \PHPStan \Rules \Rule
14
14
{
15
15
16
- /** @var Broker */
17
- private $ broker ;
16
+ /** @var ReflectionProvider */
17
+ private $ reflectionProvider ;
18
18
19
- public function __construct (Broker $ broker )
19
+ public function __construct (ReflectionProvider $ reflectionProvider )
20
20
{
21
- $ this ->broker = $ broker ;
21
+ $ this ->reflectionProvider = $ reflectionProvider ;
22
22
}
23
23
24
24
public function getNodeType (): string
@@ -39,7 +39,7 @@ public function processNode(Node $node, Scope $scope): array
39
39
: (string ) $ node ->name ;
40
40
41
41
try {
42
- $ class = $ this ->broker ->getClass ($ className );
42
+ $ class = $ this ->reflectionProvider ->getClass ($ className );
43
43
} catch (\PHPStan \Broker \ClassNotFoundException $ e ) {
44
44
return [];
45
45
}
@@ -52,7 +52,7 @@ public function processNode(Node $node, Scope $scope): array
52
52
$ interfaceName = (string ) $ implement ;
53
53
54
54
try {
55
- $ interface = $ this ->broker ->getClass ($ interfaceName );
55
+ $ interface = $ this ->reflectionProvider ->getClass ($ interfaceName );
56
56
57
57
if ($ interface ->isDeprecated ()) {
58
58
$ description = $ interface ->getDeprecatedDescription ();
0 commit comments