Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | private static function curryN(int $numberOfArguments, callable $function, ...$args): mixed |
||
49 | { |
||
50 | return (0 >= $numberOfArguments) |
||
51 | ? $function(...$args) |
||
52 | : |
||
53 | /** |
||
54 | * @psalm-param mixed ...$argsNext |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | static fn (...$argsNext): mixed => self::curryN($numberOfArguments - count($argsNext), $function, ...self::getArguments($args, $argsNext)); |
||
59 | } |
||
74 |