Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function specialProcess(Node &$current, array &$emptyLines):bool |
||
22 | { |
||
23 | $parent = $this->getParent(); |
||
24 | $addValue = ltrim($current->raw); |
||
25 | $separator = ' '; |
||
26 | if ($this->raw[-1] === ' ' || $this->raw[-1] === "\n") { |
||
27 | $separator = ''; |
||
28 | } |
||
29 | if ($current instanceof NodeBlank) { |
||
30 | $addValue = "\n"; |
||
31 | $separator = ''; |
||
32 | } |
||
33 | $node = NodeFactory::get($this->raw.$separator.$addValue, $this->line); |
||
34 | $node->indent = null; |
||
35 | $parent->value = null; |
||
36 | $parent->add($node); |
||
37 | return true; |
||
38 | } |
||
44 | } |