Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
29 | 2 | public function __call($name, $arguments) |
|
30 | { |
||
31 | 2 | $isGetter = substr($name, 0, 3) == 'get'; |
|
32 | 2 | if ($isGetter) { |
|
33 | 1 | $property = lcfirst(substr($name, 3, strlen($name) - 3)); |
|
34 | 1 | return $this->$property; |
|
35 | } |
||
36 | |||
37 | 1 | throw new \BadMethodCallException('No such method: '.$name); |
|
38 | } |
||
39 | } |