1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace loophp\collection\Operation; |
||
6 | |||
7 | use Closure; |
||
8 | use Generator; |
||
9 | use loophp\iterators\ReductionIterableAggregate; |
||
10 | |||
11 | /** |
||
12 | * @immutable |
||
13 | * |
||
14 | * @template TKey |
||
15 | * @template T |
||
16 | */ |
||
17 | final class Reduction extends AbstractOperation |
||
18 | { |
||
19 | /** |
||
20 | * @template V |
||
21 | * |
||
22 | * @return Closure(callable(mixed, mixed, mixed, iterable<mixed, mixed>): mixed): Closure(mixed): Closure(iterable<TKey, T>): Generator<TKey|int, mixed> |
||
23 | */ |
||
24 | 44 | public function __invoke(): Closure |
|
25 | { |
||
26 | 44 | return |
|
27 | /** |
||
28 | * @param callable(V, T, TKey, iterable<TKey, T>): V $callback |
||
29 | * |
||
30 | * @return Closure(V): Closure(iterable<TKey, T>): Generator<TKey|int, V> |
||
31 | */ |
||
32 | 44 | static fn (callable $callback): Closure => |
|
33 | /** |
||
34 | * @param V $initial |
||
0 ignored issues
–
show
|
|||
35 | * |
||
36 | * @return Closure(iterable<TKey, T>): Generator<TKey|int, V> |
||
37 | */ |
||
38 | 44 | static fn (mixed $initial): Closure => |
|
39 | /** |
||
40 | * @param iterable<TKey, T> $iterable |
||
41 | * |
||
42 | * @return Generator<TKey|int, V> |
||
43 | */ |
||
44 | 44 | static fn (iterable $iterable): Generator => yield from new ReductionIterableAggregate($iterable, Closure::fromCallable($callback), $initial); |
|
45 | } |
||
46 | } |
||
47 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths