Conditions | 4 |
Paths | 3 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
34 | public function parse(): AbstractVariable |
||
35 | { |
||
36 | $this->parsed = $this->parser->parse(File::read($this->unparsed)); |
||
37 | |||
38 | foreach ($this->parsed as $id => $parsedItem) { |
||
39 | if (! \is_array($parsedItem) || isset($parsedItem['id'])) { |
||
40 | continue; |
||
41 | } |
||
42 | |||
43 | $parsedItem['id'] = $id; |
||
44 | |||
45 | $this->parsed[$id] = $parsedItem; |
||
46 | } |
||
47 | |||
48 | $this->parsed = $this->parseRecursive($this->parsed); |
||
49 | |||
50 | return $this; |
||
51 | } |
||
52 | |||
72 |