Passed
Pull Request — master (#71)
by
unknown
12:05
created
src/Traits/HasSettingsTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public function getSettingsValue(): array
35 35
     {
36 36
         if (config('model_settings.settings_table_use_cache')) {
37
-            return Cache::rememberForever($this->getSettingsCacheKey(), function () {
37
+            return Cache::rememberForever($this->getSettingsCacheKey(), function() {
38 38
                 return $this->__getSettingsValue();
39 39
             });
40 40
         }
Please login to merge, or discard this patch.
src/Traits/HasSettingsField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     protected static function bootHasSettingsField()
26 26
     {
27
-        static::saving(function ($model) {
27
+        static::saving(function($model) {
28 28
             /** @var self $model */
29 29
             $model->fixSettingsValue();
30 30
         });
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         return Cache::remember(
108 108
             config('model_settings.settings_table_cache_prefix') . '::has_field',
109 109
             now()->addDays(1),
110
-            function () {
110
+            function() {
111 111
                 return Schema::connection($this->getConnectionName())
112 112
                     ->hasColumn(
113 113
                         $this->getTable(),
Please login to merge, or discard this patch.
src/Managers/AbstractSettingsManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.