Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
34 | 2 | public function __call($method, $args) |
|
35 | { |
||
36 | 2 | if (method_exists($this->metric, $method)) { |
|
37 | 1 | $rate = call_user_func([$this->metric, $method]); |
|
38 | |||
39 | 1 | return $this->convert->getValue() / $rate; |
|
40 | } |
||
41 | |||
42 | 1 | throw new BadMethodCallException(sprintf('Method: %s does not exist on class: %s', $method, get_class($this->metric))); |
|
43 | } |
||
44 | } |
||
45 |