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