| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | final class PausableIteratorAggregate implements PausableIteratorAggregateInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @var Iterator<TKey, T> |
||
| 28 | */ |
||
| 29 | private Iterator $iterator; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var IteratorAggregate<TKey, T> |
||
| 33 | */ |
||
| 34 | private IteratorAggregate $iteratorAggregate; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param Iterator<TKey, T> $iterator |
||
| 38 | */ |
||
| 39 | public function __construct(Iterator $iterator) |
||
| 40 | { |
||
| 41 | $this->iteratorAggregate = new CachingIteratorAggregate($iterator); |
||
| 42 | $this->iterator = new ArrayIterator(); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return Traversable<TKey, T> |
||
| 47 | */ |
||
| 48 | public function getIterator(): Traversable |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return Traversable<TKey, T> |
||
| 57 | */ |
||
| 58 | public function rest(): Traversable |
||
| 67 |