@@ -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 | } |
@@ -42,7 +42,9 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public static function isAssoc(array $arr) |
| 44 | 44 | { |
| 45 | - if (array() === $arr) return false; |
|
| 45 | + if (array() === $arr) { |
|
| 46 | + return false; |
|
| 47 | + } |
|
| 46 | 48 | return array_keys($arr) !== range(0, count($arr) - 1); |
| 47 | 49 | } |
| 48 | 50 | |