Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function __call($name, $arguments) |
||
19 | { |
||
20 | $action = substr($name, 0, 3); |
||
21 | |||
22 | if ($action === 'set') { |
||
23 | $property = snake_case(substr($name, 3)); |
||
24 | $this->put($property, $arguments[0]); |
||
25 | |||
26 | return $this; |
||
27 | } |
||
28 | |||
29 | throw new BadMethodCallException("Method {$name} does not exist."); |
||
30 | } |
||
31 | } |
||
32 |