Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
24 | public static function __callStatic($name, $arguments) |
||
25 | { |
||
26 | if (!isset(static::$methodArgs[$name])) { |
||
27 | throw new BadMethodCallException($name . ' is not a valid method'); |
||
28 | } |
||
29 | |||
30 | $numArgs = count($arguments); |
||
31 | |||
32 | if ($numArgs === static::$methodArgs[$name]) { |
||
33 | $args = array_slice($arguments, 1, -1); |
||
34 | } else { |
||
35 | $args = array_slice($arguments, 1); |
||
36 | } |
||
37 | |||
38 | return call_user_func_array([new Arr(), $name], $args); |
||
39 | } |
||
40 | } |
||
41 |