Conditions | 4 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function __call($methd, $sentargs) |
||
18 | { |
||
19 | $method = ($methd === 'list' ? 'getList' : $methd ); |
||
20 | if (array_key_exists($method, $this->methods) && is_callable($this->methods[$method])) { |
||
21 | return call_user_func_array($this->methods[$method], $sentargs); |
||
22 | } else { |
||
23 | // User attempted to call a function that does not exist |
||
24 | throw new \Exception('Function "' . $method . '" does not exist for "' . $this->route . '".'); |
||
25 | } |
||
26 | } |
||
27 | |||
59 |