| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 48 | 2 | public function getAnnotations() |
|
| 49 | { |
||
| 50 | 2 | $annotations = unserialize($this->object->methodAnnotations); |
|
|
1 ignored issue
–
show
|
|||
| 51 | 2 | if (isset($annotations[$this->method])) { |
|
| 52 | 1 | return $annotations[$this->method]; |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | return []; |
|
| 56 | } |
||
| 57 | |||
| 71 |
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: