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