| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | final class SimpleCachingIteratorAggregate implements IteratorAggregate |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var CachingIterator<TKey, T> |
||
| 27 | */ |
||
| 28 | private CachingIterator $iterator; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param Iterator<TKey, T> $iterator |
||
| 32 | */ |
||
| 33 | public function __construct(Iterator $iterator) |
||
| 34 | { |
||
| 35 | $this->iterator = new CachingIterator( |
||
| 36 | $iterator, |
||
| 37 | CachingIterator::FULL_CACHE |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return Traversable<TKey, T> |
||
| 43 | */ |
||
| 44 | public function getIterator(): Traversable |
||
| 52 | } |
||
| 53 | } |
||
| 54 |