| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.0078 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 2 | public function __call($name, $arguments) |
|
| 30 | { |
||
| 31 | 2 | $get = substr($name,0, 3); |
|
| 32 | 2 | if ($get !== 'get') { |
|
| 33 | return null; |
||
| 34 | } |
||
| 35 | 2 | $parameter = function($name) { |
|
| 36 | 2 | return ltrim(strtolower(preg_replace('/[A-Z]/', '_\0', str_replace("get", "", $name))), '_'); |
|
| 37 | 2 | }; |
|
| 38 | 2 | return $this->getResource($parameter($name)); |
|
| 39 | } |
||
| 40 | |||
| 72 | } |