| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 17 | 8 | protected function prepareNext(): void |
|
| 18 | { |
||
| 19 | 8 | if (!$this->items->valid()) { |
|
| 20 | 2 | return; |
|
| 21 | } |
||
| 22 | |||
| 23 | 6 | $file = $this->items->current(); |
|
| 24 | |||
| 25 | /** @noinspection PhpIncludeInspection */ |
||
| 26 | 6 | $entries = i\type_check( |
|
| 27 | 6 | (include $file), |
|
| 28 | 6 | 'array', |
|
| 29 | 6 | new \UnexpectedValueException("Failed to load container entries from '$file': Invalid or no return value") |
|
| 30 | ); |
||
| 31 | |||
| 32 | 6 | $this->entries = new \ArrayIterator($entries); |
|
| 33 | |||
| 34 | 6 | $this->items->next(); |
|
| 35 | 6 | } |
|
| 37 |