| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.2098 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 2 | private function createChildGenerator(): Generator |
|
| 37 | { |
||
| 38 | 2 | $validIndex = 0; |
|
| 39 | 2 | foreach ($this->data as $index => $element) { |
|
| 40 | 2 | if ($index !== $validIndex++) { |
|
| 41 | 2 | throw new Exception\InvalidElementKeyException($index, $this->path); |
|
| 42 | } |
||
| 43 | yield $index => $this |
||
| 44 | ->valueFactory |
||
| 45 | ->createValue($element, $this->path->copyWithElement($index)); |
||
| 46 | } |
||
| 54 |