Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
39 | 17 | public function __call($name, $args) |
|
40 | { |
||
41 | 17 | if (method_exists($this->client, $name)) { |
|
42 | 7 | return call_user_func_array([$this->client, $name], $args); |
|
43 | } |
||
44 | |||
45 | 16 | if (array_key_exists($name, $this->queries)) { |
|
46 | 15 | $query = call_user_func_array($this->queries[$name], $args); |
|
47 | 15 | return $this->client->query($query); |
|
48 | } |
||
49 | |||
50 | 1 | throw new RuntimeException("The method you are using is not allowed: '{$name}', do you have to add it with 'addQuery'"); |
|
51 | } |
||
52 | } |
||
53 |