Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | public static function of(): Closure |
|
29 | { |
||
30 | return |
||
31 | /** |
||
32 | * @param callable(U, T, TKey, iterable<TKey, T>): U $callable |
||
33 | */ |
||
34 | 2 | static fn (callable $callable): Closure => |
|
35 | /** |
||
36 | * @param U $accumulator |
||
37 | */ |
||
38 | 2 | static fn ($accumulator): Closure => |
|
39 | /** |
||
40 | * @param iterable<TKey, T> $iterable |
||
41 | * |
||
42 | * @return U |
||
43 | */ |
||
44 | 2 | static fn (iterable $iterable): mixed => FPT::end()($accumulator)(FPT::reduction()($callable)($accumulator)($iterable)); |
|
45 | } |
||
47 |