Conditions | 2 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 4 | public static function of(): Closure |
|
28 | { |
||
29 | return |
||
30 | /** |
||
31 | * @param U $ifEmpty |
||
32 | */ |
||
33 | static function (mixed $ifEmpty): Closure { |
||
34 | return |
||
35 | 4 | /** |
|
36 | * @param iterable<T> $iterable |
||
37 | * |
||
38 | * @return T|U |
||
39 | */ |
||
40 | static function (iterable $iterable) use ($ifEmpty): mixed { |
||
41 | 4 | foreach ($iterable as $ifEmpty) { |
|
42 | 4 | } |
|
43 | |||
44 | return $ifEmpty; |
||
45 | 4 | }; |
|
49 |