Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | function deleteat(/* ...$args */) |
||
8 | { |
||
9 | 1 | $args = func_get_args(); |
|
10 | |||
11 | $deleteat = function ($n, array $xs) { |
||
12 | 1 | if ($n > 0) { |
|
13 | 1 | return array_merge(take($n, $xs), drop($n + 1, $xs)); |
|
14 | } |
||
15 | |||
16 | return $xs; |
||
17 | 1 | }; |
|
18 | |||
19 | 1 | return call_user_func_array(partial($deleteat), $args); |
|
20 | } |
||
21 |