| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function createChildIterator(): Iterator |
||
| 32 | { |
||
| 33 | $validIndex = 0; |
||
| 34 | foreach ($this->data as $index => $element) { |
||
| 35 | if ($index !== $validIndex++) { |
||
| 36 | throw new Exception\InvalidElementKeyException($index, $this->path); |
||
| 37 | } |
||
| 38 | yield $index => $this |
||
| 39 | ->valueFactory |
||
| 40 | ->createValue($element, $this->path->copyWithElement($index)); |
||
| 41 | } |
||
| 49 |