Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
33 | 15 | public function __call($name, $values) |
|
34 | { |
||
35 | 15 | $method = substr($name, 0, 3); |
|
36 | 15 | $nameField = lcfirst(substr($name, 3)); |
|
37 | 15 | if (!array_key_exists($nameField, $this->fields)) { |
|
38 | 1 | throw new UndefinedMethodException('Call to undefined method ' . $name); |
|
39 | } |
||
40 | 15 | return $this->$method($nameField, $values); |
|
41 | } |
||
64 |