Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | final class UniqueIterableAggregate implements IteratorAggregate |
||
26 | { |
||
27 | /** |
||
28 | * @var InterruptableIterableIteratorAggregate<TKey, T> |
||
29 | */ |
||
30 | private InterruptableIterableIteratorAggregate $iterable; |
||
31 | |||
32 | /** |
||
33 | * @param iterable<TKey, T> $iterable |
||
34 | */ |
||
35 | 1 | public function __construct(iterable $iterable, private int $retries = PHP_INT_MAX) |
|
36 | { |
||
37 | 1 | $this->iterable = new InterruptableIterableIteratorAggregate($iterable); |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return Generator<TKey, T> |
||
42 | */ |
||
43 | 1 | public function getIterator(): Generator |
|
62 | } |
||
63 | } |
||
65 |