Issues (85)

src/Operation/Wrap.php (1 issue)

Labels
Severity
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 Wrap extends AbstractOperation
17
{
18
    /**
19
     * @return Closure(iterable<TKey, T>): Generator<int, array<TKey, T>>
20
     */
21 4
    public function __invoke(): Closure
22
    {
23
        /** @var Closure(iterable<TKey, T>): Generator<int, array<TKey, T>> $pipe */
24 4
        $pipe = (new Pipe())()(
25 4
            (new Map())()(
26
                /**
27
                 * @param T $value
28
                 * @param TKey $key
0 ignored issues
show
The type loophp\collection\Operation\TKey was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
                 *
30
                 * @return array<TKey, T>
31
                 */
32 4
                static fn (mixed $value, mixed $key): array => [$key => $value]
33 4
            ),
34 4
            (new Normalize())()
35 4
        );
36
37
        // Point free style.
38 4
        return $pipe;
39
    }
40
}
41