Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
43 | public function __call($method, $args) |
||
44 | { |
||
45 | if (method_exists($this->metric, $method)) { |
||
46 | $rate = call_user_func([$this->metric, $method]); |
||
47 | |||
48 | $this->convert->setValue($rate * $this->value); |
||
49 | |||
50 | return new To($this->convert, $this->metric); |
||
51 | } |
||
52 | |||
53 | throw new BadMethodCallException(sprintf('Method: %s does not exist on class: %s', $method, get_class($this->metric))); |
||
54 | } |
||
55 | } |
||
56 |