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