Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 11 | public function __call($method, $args) |
|
15 | { |
||
16 | 11 | $data = false; |
|
17 | 11 | switch (substr($method, 0, 3)) { |
|
18 | 11 | case 'get': |
|
19 | 11 | $get = substr($method, 3); |
|
20 | 11 | $data = $this->$get; |
|
21 | 11 | break; |
|
22 | 10 | case 'set': |
|
23 | 10 | $set = substr($method, 3); |
|
24 | 10 | $data = $args[0]; |
|
25 | 10 | $this->$set = $data; |
|
26 | 10 | break; |
|
27 | 11 | } |
|
28 | |||
29 | 11 | return $data; |
|
30 | } |
||
31 | } |
||
32 |