@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | // only re-run if nested array is associative (key-based) |
59 | 59 | // cannot use pre-shipped Arr:dot method |
60 | 60 | if (is_array($value) && static::isAssoc($value) && !empty($value)) { |
61 | - $results = array_merge($results, static::dotFlatten($value, $prepend.$key.'.')); |
|
61 | + $results = array_merge($results, static::dotFlatten($value, $prepend . $key . '.')); |
|
62 | 62 | } else { |
63 | - $results[$prepend.$key] = $value; |
|
63 | + $results[$prepend . $key] = $value; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | return $results; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function all(): array |
74 | 74 | { |
75 | 75 | if (config('model_settings.settings_cache_all') && !($this instanceof RedisSettingsManager)) { |
76 | - return Cache::remember($this->getAllSettingsCacheKey(), now()->addDay(), function () { |
|
76 | + return Cache::remember($this->getAllSettingsCacheKey(), now()->addDay(), function() { |
|
77 | 77 | return $this->getMultiple(null); |
78 | 78 | }); |
79 | 79 | } |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | foreach ($paths as $path) { |
143 | 143 | // Get default value |
144 | 144 | $defaultValue = null; |
145 | - if(is_array($default)){ |
|
145 | + if (is_array($default)) { |
|
146 | 146 | $defaultValue = Arr::get($default, $path); |
147 | - }else{ |
|
147 | + } else { |
|
148 | 148 | $defaultValue = $default; |
149 | 149 | } |
150 | 150 | Arr::set($array, $path, Arr::get($allFlattened, $path, $defaultValue)); |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | */ |
178 | 178 | protected function forgetEmpty(&$settings, $path) { |
179 | 179 | // Forget path if it is empty |
180 | - if(!Arr::get($settings, $path)){ |
|
180 | + if (!Arr::get($settings, $path)) { |
|
181 | 181 | Arr::forget($settings, $path); |
182 | - }else{ |
|
182 | + } else { |
|
183 | 183 | return; |
184 | 184 | } |
185 | 185 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | array_pop($paths); |
191 | 191 | |
192 | 192 | // Return if it was the last |
193 | - if(count($paths) === 0){ |
|
193 | + if (count($paths) === 0) { |
|
194 | 194 | return; |
195 | 195 | } |
196 | 196 |