| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function leaveNode(Node $node) |
||
| 17 | { |
||
| 18 | if (!$node instanceof Declare_) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | |||
| 22 | $result = array_filter(array_map(function (DeclareDeclare $declare) { |
||
| 23 | return $declare->key !== 'strict_types'; |
||
| 24 | }, $node->declares)); |
||
| 25 | |||
| 26 | if (empty($result)) { |
||
| 27 | return NodeTraverser::REMOVE_NODE; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 31 |