1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace loophp\collection\Operation; |
||
6 | |||
7 | use Closure; |
||
8 | use Generator; |
||
9 | |||
10 | /** |
||
11 | * @immutable |
||
12 | * |
||
13 | * @template TKey |
||
14 | * @template T |
||
15 | */ |
||
16 | final class Column extends AbstractOperation |
||
17 | { |
||
18 | /** |
||
19 | * @return Closure(mixed): Closure(iterable<TKey, T>): Generator<int, mixed> |
||
20 | */ |
||
21 | 6 | public function __invoke(): Closure |
|
22 | { |
||
23 | 6 | return |
|
24 | /** |
||
25 | * @return Closure(iterable<TKey, T>): Generator<int, mixed> |
||
26 | */ |
||
27 | 6 | static function (mixed $column): Closure { |
|
28 | 6 | $filterCallbackBuilder = |
|
29 | /** |
||
30 | * @param T $value |
||
31 | * @param TKey $key |
||
0 ignored issues
–
show
|
|||
32 | */ |
||
33 | 6 | static fn (mixed $value, mixed $key): bool => $key === $column; |
|
34 | |||
35 | /** @var Closure(iterable<TKey, T>): Generator<int, mixed> $pipe */ |
||
36 | 6 | $pipe = (new Pipe())()( |
|
37 | 6 | (new Transpose())(), |
|
38 | 6 | (new Filter())()($filterCallbackBuilder), |
|
39 | 6 | (new Head())(), |
|
40 | 6 | (new Flatten())()(1) |
|
41 | 6 | ); |
|
42 | |||
43 | // Point free style. |
||
44 | 6 | return $pipe; |
|
45 | 6 | }; |
|
46 | } |
||
47 | } |
||
48 |
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