| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 124 | public function __invoke(): Closure |
|
| 24 | { |
||
| 25 | 124 | return |
|
| 26 | /** |
||
| 27 | * @param TKey $keyToGet |
||
| 28 | * |
||
| 29 | * @return Closure(V): Closure(iterable<TKey, T>): Generator<TKey, T|V> |
||
| 30 | */ |
||
| 31 | 124 | static fn (mixed $keyToGet): Closure => |
|
| 32 | /** |
||
| 33 | * @param V $default |
||
|
|
|||
| 34 | * |
||
| 35 | * @return Closure(iterable<TKey, T>): Generator<TKey, T|V> |
||
| 36 | */ |
||
| 37 | 124 | static function (mixed $default) use ($keyToGet): Closure { |
|
| 38 | /** @var Closure(iterable<TKey, T>): (Generator<TKey, T|V>) $pipe */ |
||
| 39 | 124 | $pipe = (new Pipe())()( |
|
| 40 | 124 | (new Filter())()( |
|
| 41 | /** |
||
| 42 | * @param T $value |
||
| 43 | * @param TKey $key |
||
| 44 | */ |
||
| 45 | 124 | static fn (mixed $value, mixed $key): bool => $key === $keyToGet |
|
| 46 | 124 | ), |
|
| 47 | 124 | (new Append())()([$default]), |
|
| 48 | 124 | (new Head())() |
|
| 49 | 124 | ); |
|
| 50 | |||
| 51 | // Point free style. |
||
| 52 | 124 | return $pipe; |
|
| 53 | 124 | }; |
|
| 56 |
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