Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | final class ReduceIterableAggregate implements IteratorAggregate |
||
24 | { |
||
25 | /** |
||
26 | * @var Closure(W, T, TKey, iterable<TKey, T>): W |
||
27 | */ |
||
28 | private Closure $closure; |
||
29 | |||
30 | /** |
||
31 | * @param iterable<TKey, T> $iterable |
||
32 | * @param (Closure(W, T, TKey, iterable<TKey, T>): W) $closure |
||
|
|||
33 | * @param W $initial |
||
34 | */ |
||
35 | 1 | public function __construct(private iterable $iterable, Closure $closure, private mixed $initial) |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return Generator<int, W> |
||
42 | */ |
||
43 | 1 | public function getIterator(): Generator |
|
54 |