Issues (85)

src/Operation/Lines.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
use const PHP_EOL;
11
12
/**
13
 * @immutable
14
 *
15
 * @template TKey
16
 * @template T
17
 */
18
final class Lines extends AbstractOperation
19
{
20
    /**
21
     * @return Closure(iterable<TKey, T>): Generator<int, string>
22
     */
23 2
    public function __invoke(): Closure
24
    {
25
        /** @var Closure(iterable<TKey, T>): Generator<int, string> $pipe */
26 2
        $pipe = (new Pipe())()(
27 2
            (new Explode())()([PHP_EOL, "\n", "\r\n"]),
28 2
            (new Map())()(
29
                /**
30
                 * @param list<T> $value
0 ignored issues
show
The type loophp\collection\Operation\list 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...
31
                 */
32 2
                static fn (array $value): string => implode('', $value)
33 2
            )
34 2
        );
35
36
        // Point free style.
37 2
        return $pipe;
38
    }
39
}
40