| Conditions | 6 |
| Paths | 6 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6.0359 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 2 | public function applyToNode(Node $node) |
|
| 21 | { |
||
| 22 | 2 | $instruction = $node->getInstruction($this); |
|
| 23 | |||
| 24 | 2 | if (is_array($instruction) || is_object($instruction)) { |
|
| 25 | 2 | $instruction = (object)$instruction; |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | if (!isset($instruction) || !isset($instruction->input)) { |
|
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | 2 | $glue = isset($instruction->glue) ? $instruction->glue : ''; |
|
| 33 | 2 | $result = join($glue, $instruction->input); |
|
| 34 | 2 | $node->setResult($result); |
|
| 35 | 2 | } |
|
| 36 | } |
||
| 37 |