| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 11 | enum Combinators |
||
| 12 | { |
||
| 13 | public static function extractArgs(Closure $f, int $offset = 0, int $length = 0): Closure |
||
| 14 | { |
||
| 15 | return static fn (...$args): mixed => $f(...array_slice($args, $offset, $length)); |
||
| 16 | } |
||
| 17 | |||
| 18 | public static function I(): Closure |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function K(): Closure |
||
| 24 | { |
||
| 25 | return static fn (...$a): Closure => static fn (...$b): mixed => current($a); |
||
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | public static function Ki(): Closure |
||
| 29 | { |
||
| 30 | return static fn (...$a): Closure => static fn (...$b): mixed => current($b); |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function reverseArgs(Closure $f): Closure |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.