Conditions | 5 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
10 | 195 | public function getDefaultSettings(): array |
|
11 | { |
||
12 | 195 | if (property_exists($this, 'defaultSettings') |
|
13 | 195 | && is_array($this->defaultSettings)) { |
|
14 | 189 | return Arr::wrap($this->defaultSettings); |
|
15 | 6 | } elseif (($defaultSettings = config('model_settings.defaultSettings.' . $this->getTable())) |
|
16 | 6 | && is_array($defaultSettings)) { |
|
17 | 3 | return Arr::wrap($defaultSettings); |
|
18 | } |
||
19 | 6 | ||
20 | return []; |
||
21 | } |
||
36 |