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