| Total Complexity | 6 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 22 | final class IterableIterator implements Iterator |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var Iterator<TKey, T> |
||
| 26 | */ |
||
| 27 | private Iterator $iterator; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param iterable<TKey, T> $iterable |
||
| 31 | */ |
||
| 32 | 7 | public function __construct(iterable $iterable) |
|
| 33 | { |
||
| 34 | 7 | $this->iterator = new ClosureIterator( |
|
| 35 | /** |
||
| 36 | * @param iterable<TKey, T> $iterable |
||
| 37 | * |
||
| 38 | * @return Generator<TKey, T> |
||
| 39 | */ |
||
| 40 | 7 | static fn (iterable $iterable): Generator => yield from $iterable, |
|
| 41 | 7 | [$iterable] |
|
| 42 | ); |
||
| 43 | 7 | } |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return T |
||
|
|
|||
| 47 | */ |
||
| 48 | 5 | #[ReturnTypeWillChange] |
|
| 49 | public function current() |
||
| 50 | { |
||
| 51 | 5 | return $this->iterator->current(); |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return TKey |
||
| 56 | */ |
||
| 57 | 2 | #[ReturnTypeWillChange] |
|
| 58 | public function key() |
||
| 59 | { |
||
| 60 | 2 | return $this->iterator->key(); |
|
| 61 | } |
||
| 62 | |||
| 63 | 4 | public function next(): void |
|
| 66 | 4 | } |
|
| 67 | |||
| 68 | 1 | public function rewind(): void |
|
| 71 | 1 | } |
|
| 72 | |||
| 73 | 4 | public function valid(): bool |
|
| 78 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths