| Conditions | 4 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function __get($key) { |
||
| 51 | $accessor = 'get' . Str::studly($key) . 'Attribute'; |
||
| 52 | |||
| 53 | if (method_exists($this, $accessor)) { |
||
| 54 | return $this->$accessor(); |
||
| 55 | } |
||
| 56 | |||
| 57 | try { |
||
| 58 | if ($this->has($key)) { |
||
| 59 | return $this->content[$key]; |
||
| 60 | } |
||
| 61 | |||
| 62 | return false; |
||
| 63 | } catch (Exception $e) { |
||
| 64 | return 'Caught exception: ' . $e->getMessage(); |
||
| 65 | } |
||
| 69 | } |