Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function __construct(string $nodeString, ?int $line) |
|
20 | { |
||
21 | 2 | parent::__construct($nodeString, $line); |
|
22 | 2 | preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1, -1)), $matches); |
|
23 | 2 | foreach ($matches['k'] as $index => $property) { |
|
24 | 2 | $pair = $property . ': ' . trim($matches['v'][$index]); |
|
25 | 2 | $child = NodeFactory::get($pair, (int) $line); |
|
26 | 2 | $child->indent = null; |
|
27 | 2 | $this->add($child); |
|
28 | } |
||
44 |