| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 7 | public function __call($name, $arguments) |
|
| 17 | { |
||
| 18 | 7 | if (substr($name, 0, 3) == 'get') { |
|
| 19 | 7 | $field = substr($name, 3); |
|
| 20 | 7 | $field = strtolower($field[0]) . substr($field, 1); |
|
| 21 | 7 | return $this->fields[$field] ?? null; |
|
| 22 | } else { |
||
| 23 | throw new RuntimeException('Call to undefined method. Supports magic getters only.', 1311006605); |
||
| 24 | } |
||
| 47 | } |