Conditions | 5 |
Paths | 7 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function leaveNode(Node $node) |
||
23 | { |
||
24 | if (!$node instanceof Node\Expr\Array_) |
||
25 | return; |
||
26 | |||
27 | $stack = []; |
||
28 | |||
29 | foreach ($node->items as $arrayItem) |
||
30 | { |
||
31 | if ($arrayItem->value instanceof Node\Expr\Variable) |
||
32 | $stack[] = $arrayItem->value; |
||
33 | } |
||
34 | |||
35 | if (!empty($stack)) |
||
36 | { |
||
37 | return new Node\Expr\List_($stack); |
||
38 | } |
||
39 | } |
||
40 | } |