Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
42 | 8 | protected function prepareNext(): void |
|
43 | { |
||
44 | 8 | if (!$this->items->valid()) { |
|
45 | 2 | return; |
|
46 | } |
||
47 | |||
48 | 6 | $class = $this->items->current(); |
|
49 | 6 | $entries = call_user_func($this->apply, $class); |
|
50 | |||
51 | 6 | expect_type($entries, 'array', \UnexpectedValueException::class, |
|
52 | 6 | "Failed to load container entries for '$class': Expected array, callback returned %s"); |
|
53 | |||
54 | 5 | $this->entries = new \ArrayIterator($entries); |
|
55 | |||
56 | 5 | $this->items->next(); |
|
57 | 5 | } |
|
74 |