|
9 | 9 |
|
10 | 10 | use Cake\ORM\Association; |
11 | 11 | use Cake\ORM\Table; |
12 | | -use PHPStan\Broker\Broker; |
13 | | -use PHPStan\Reflection\BrokerAwareExtension; |
14 | 12 | use PHPStan\Reflection\ClassReflection; |
15 | 13 | use PHPStan\Reflection\MethodReflection; |
16 | 14 | use PHPStan\Reflection\MethodsClassReflectionExtension; |
17 | 15 | use PHPStan\Reflection\PropertiesClassReflectionExtension; |
18 | 16 | use PHPStan\Reflection\PropertyReflection; |
| 17 | +use PHPStan\Reflection\ReflectionProvider; |
19 | 18 |
|
20 | 19 | class AssociationTableMixinClassReflectionExtension implements |
21 | 20 | PropertiesClassReflectionExtension, |
22 | | - MethodsClassReflectionExtension, |
23 | | - BrokerAwareExtension |
| 21 | + MethodsClassReflectionExtension |
24 | 22 | { |
25 | 23 | /** |
26 | | - * @var \PHPStan\Broker\Broker |
| 24 | + * @var \PHPStan\Reflection\ReflectionProvider |
27 | 25 | */ |
28 | | - private Broker $broker; |
| 26 | + protected ReflectionProvider $reflectionProvider; |
29 | 27 |
|
30 | 28 | /** |
31 | | - * @param \PHPStan\Broker\Broker $broker Class reflection broker |
32 | | - * @return void |
| 29 | + * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider |
33 | 30 | */ |
34 | | - public function setBroker(Broker $broker): void |
| 31 | + public function __construct(ReflectionProvider $reflectionProvider) |
35 | 32 | { |
36 | | - $this->broker = $broker; |
| 33 | + $this->reflectionProvider = $reflectionProvider; |
37 | 34 | } |
38 | 35 |
|
39 | 36 | /** |
40 | 37 | * @return \PHPStan\Reflection\ClassReflection |
41 | 38 | */ |
42 | 39 | protected function getTableReflection(): ClassReflection |
43 | 40 | { |
44 | | - return $this->broker->getClass(Table::class); |
| 41 | + return $this->reflectionProvider->getClass(Table::class); |
45 | 42 | } |
46 | 43 |
|
47 | 44 | /** |
|
0 commit comments