Conditions | 2 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 360 | public static function or(): Closure |
|
20 | { |
||
21 | 360 | return |
|
22 | /** |
||
23 | * @param array<array-key, callable(mixed...): bool> $callbacks |
||
|
|||
24 | * |
||
25 | * @return Closure(mixed...): bool |
||
26 | */ |
||
27 | 360 | static fn (array $callbacks): Closure => static fn (mixed ...$parameters): bool => array_reduce( |
|
28 | 360 | $callbacks, |
|
29 | /** |
||
30 | * @param callable(mixed...): bool $callable |
||
31 | */ |
||
32 | 360 | static fn (bool $carry, callable $callable): bool => $carry || $callable(...$parameters), |
|
33 | 360 | false |
|
34 | 360 | ); |
|
37 |