| Conditions | 3 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 2 | public static function of(): Closure |
|
| 20 | { |
||
| 21 | 2 | return static fn (callable ...$callables): Closure => static fn ($init = null): Closure => static function (iterable ...$iterables) use ($callables, $init) { |
|
| 22 | 2 | foreach ($iterables as $iterable) { |
|
| 23 | 2 | foreach ($iterable as $key => $item) { |
|
| 24 | 2 | yield $key => ($init = array_reduce( |
|
| 25 | 2 | $callables, |
|
| 26 | 2 | static fn ($init, callable $callback) => $callback($init, $item, $key, $iterable), |
|
| 27 | $init |
||
| 28 | )); |
||
| 34 |