| 1 | <?php |
||
| 9 | class ReflectionClass extends \ReflectionClass implements Reader |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var WeavedInterface |
||
| 13 | */ |
||
| 14 | private $object; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Set dependencies |
||
| 18 | * |
||
| 19 | * @param WeavedInterface $object |
||
| 20 | */ |
||
| 21 | 2 | public function setObject(WeavedInterface $object) |
|
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritDoc} |
||
| 28 | */ |
||
| 29 | 2 | public function getAnnotations() |
|
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritDoc} |
||
| 36 | */ |
||
| 37 | 2 | public function getAnnotation($annotationName) |
|
| 46 | } |
||
| 47 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: