| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function afterTraverse(array $nodes) |
||
| 18 | { |
||
| 19 | foreach ($nodes as &$node) { |
||
| 20 | |||
| 21 | if (!$node instanceof Node\Stmt\Expression) { |
||
| 22 | continue; |
||
| 23 | } |
||
| 24 | |||
| 25 | if (!$node->expr instanceof Node\Expr\FuncCall) { |
||
| 26 | continue; |
||
| 27 | } |
||
| 28 | |||
| 29 | if (!isset($node->expr->name)) { |
||
| 30 | continue; |
||
| 31 | } |
||
| 32 | |||
| 33 | if ($node->expr->name->parts[0] != 'define') { |
||
| 34 | continue; |
||
| 35 | } |
||
| 36 | |||
| 37 | $nameNode = $node->expr->args[0]->value; |
||
| 38 | $valueNode = $node->expr->args[1]->value; |
||
| 52 |