| Conditions | 3 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function __invoke(): Closure |
||
| 22 | { |
||
| 23 | return |
||
| 24 | /** |
||
| 25 | * @param callable(T, TKey, iterable<TKey, T>): bool ...$callbacks |
||
| 26 | * |
||
| 27 | * @return Closure(iterable<TKey, T>): Generator<TKey, T> |
||
| 28 | */ |
||
| 29 | static fn(callable ...$callbacks): Closure => /** |
||
| 30 | * @param iterable<TKey, T> $iterable |
||
| 31 | * |
||
| 32 | * @return Generator<TKey, T> |
||
| 33 | */ |
||
| 34 | static function (iterable $iterable) use ($callbacks): Generator { |
||
| 35 | foreach ($iterable as $key => $value) { |
||
| 36 | foreach ($callbacks as $callback) { |
||
| 37 | $callback($value, $key, $iterable); |
||
| 38 | } |
||
| 39 | |||
| 40 | yield $key => $value; |
||
| 41 | } |
||
| 45 |