| Conditions | 4 |
| Paths | 1 |
| Total Lines | 4 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function enterNode(NodeInterface $node) |
||
| 16 | { |
||
| 17 | $this->debug(str_repeat(' ', ++$this->level).$node->getType().(property_exists($node, 'name') ? ' '.(method_exists($node->name, 'toString') ? $node->name->toString() : $node->name) : '').(method_exists($node, 'getLine') ? ' L:'.$node->getLine() : '').PHP_EOL); |
||
|
|
|||
| 18 | } |
||
| 19 | |||
| 45 |
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: