| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 27 | public function getSettingsAttribute() |
||
| 28 | { |
||
| 29 | if (array_key_exists('settings', $this->json)) { |
||
|
|
|||
| 30 | return $this->json['settings']; |
||
| 31 | } |
||
| 32 | |||
| 33 | if (!array_key_exists('admin', $this->json)) { |
||
| 34 | return []; |
||
| 35 | } |
||
| 36 | |||
| 37 | if (!array_key_exists('settings', $this->json['admin'])) { |
||
| 38 | return []; |
||
| 39 | } |
||
| 40 | |||
| 41 | return $this->json['admin']['settings']; |
||
| 42 | } |
||
| 66 |