| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 8 | protected function prepareNext(): void |
|
| 20 | { |
||
| 21 | 8 | if (!$this->items->valid()) { |
|
| 22 | 2 | return; |
|
| 23 | } |
||
| 24 | |||
| 25 | 6 | $file = $this->items->current(); |
|
| 26 | |||
| 27 | 6 | $entries = include $file; |
|
| 28 | 6 | expect_type($entries, 'array', \UnexpectedValueException::class, |
|
| 29 | 6 | "Failed to load container entries from '$file': Invalid or no return value"); |
|
| 30 | |||
| 31 | 6 | $this->entries = new \ArrayIterator($entries); |
|
| 32 | |||
| 33 | 6 | $this->items->next(); |
|
| 34 | 6 | } |
|
| 36 |