| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function leaveNode(Node $node) |
||
| 11 | { |
||
| 12 | if (!$node instanceof Node\Stmt\GroupUse) { |
||
| 13 | return; |
||
| 14 | } |
||
| 15 | |||
| 16 | $nodePrefixParts = $node->prefix->parts; |
||
| 17 | |||
| 18 | $seperateUseStatements = array_map(function ($useNode) use ($nodePrefixParts) { |
||
| 19 | return $this->createUseNode($nodePrefixParts, $useNode); |
||
| 20 | }, $node->uses); |
||
| 21 | |||
| 22 | return $seperateUseStatements; |
||
| 23 | } |
||
| 24 | |||
| 37 | } |
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: