Passed
Push — master ( a18ccf...4ddd37 )
by Mike
02:51
created
src/Traits/BuilderCaching.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 {
7 7
     public function all($columns = ['*']) : Collection
8 8
     {
9
-        if (! $this->isCachable()) {
9
+        if (!$this->isCachable()) {
10 10
             $this->model->disableModelCaching();
11 11
         }
12 12
 
Please login to merge, or discard this patch.
src/Console/Commands/Clear.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         $option = $this->option('model');
14 14
 
15
-        if (! $option) {
15
+        if (!$option) {
16 16
             return $this->flushEntireCache();
17 17
         }
18 18
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $usesCachableTrait = $this->getAllTraitsUsedByClass($option)
37 37
             ->contains("GeneaLabs\LaravelModelCaching\Traits\Cachable");
38 38
 
39
-        if (! $usesCachableTrait) {
39
+        if (!$usesCachableTrait) {
40 40
             $this->error("'{$option}' is not an instance of CachedModel.");
41 41
             $this->line("Only CachedModel instances can be flushed.");
42 42
 
Please login to merge, or discard this patch.
src/CacheTags.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $tags = collect($this->eagerLoad)
30 30
             ->keys()
31
-            ->map(function ($relationName) {
31
+            ->map(function($relationName) {
32 32
                 $relation = $this->getRelation($relationName);
33 33
 
34 34
                 return $this->getCachePrefix()
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     protected function getRelation(string $relationName) : Relation
54 54
     {
55 55
         return collect(explode('.', $relationName))
56
-            ->reduce(function ($carry, $name) {
56
+            ->reduce(function($carry, $name) {
57 57
                 $carry = $carry ?: $this->model;
58 58
                 $carry = $this->getRelatedModel($carry);
59 59
 
Please login to merge, or discard this patch.
src/Traits/Buildable.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 {
8 8
     public function avg($column)
9 9
     {
10
-        if (! $this->isCachable()) {
10
+        if (!$this->isCachable()) {
11 11
             return parent::avg($column);
12 12
         }
13 13
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function count($columns = "*")
20 20
     {
21
-        if (! $this->isCachable()) {
21
+        if (!$this->isCachable()) {
22 22
             return parent::count($columns);
23 23
         }
24 24
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function find($id, $columns = ["*"])
50 50
     {
51
-        if (! $this->isCachable()) {
51
+        if (!$this->isCachable()) {
52 52
             return parent::find($id, $columns);
53 53
         }
54 54
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     public function first($columns = ["*"])
66 66
     {
67
-        if (! $this->isCachable()) {
67
+        if (!$this->isCachable()) {
68 68
             return parent::first($columns);
69 69
         }
70 70
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function get($columns = ["*"])
85 85
     {
86
-        if (! $this->isCachable()) {
86
+        if (!$this->isCachable()) {
87 87
             return parent::get($columns);
88 88
         }
89 89
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     public function max($column)
118 118
     {
119
-        if (! $this->isCachable()) {
119
+        if (!$this->isCachable()) {
120 120
             return parent::max($column);
121 121
         }
122 122
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function min($column)
129 129
     {
130
-        if (! $this->isCachable()) {
130
+        if (!$this->isCachable()) {
131 131
             return parent::min($column);
132 132
         }
133 133
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $pageName = "page",
143 143
         $page = null
144 144
     ) {
145
-        if (! $this->isCachable()) {
145
+        if (!$this->isCachable()) {
146 146
             return parent::paginate($perPage, $columns, $pageName, $page);
147 147
         }
148 148
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $result = "";
164 164
 
165 165
         foreach ($items as $key => $value) {
166
-            $result .= $glue . $key . $glue . $value;
166
+            $result .= $glue.$key.$glue.$value;
167 167
         }
168 168
 
169 169
         return $result;
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function pluck($column, $key = null)
173 173
     {
174
-        if (! $this->isCachable()) {
174
+        if (!$this->isCachable()) {
175 175
             return parent::pluck($column, $key);
176 176
         }
177 177
 
178
-        $keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : "");
178
+        $keyDifferentiator = "-pluck_{$column}".($key ? "_{$key}" : "");
179 179
         $cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator);
180 180
 
181 181
         return $this->cachedValue(func_get_args(), $cacheKey);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
     public function sum($column)
185 185
     {
186
-        if (! $this->isCachable()) {
186
+        if (!$this->isCachable()) {
187 187
             return parent::sum($column);
188 188
         }
189 189
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
     public function value($column)
203 203
     {
204
-        if (! $this->isCachable()) {
204
+        if (!$this->isCachable()) {
205 205
             return parent::value($column);
206 206
         }
207 207
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         return $this->cache($cacheTags)
277 277
             ->rememberForever(
278 278
                 $hashedCacheKey,
279
-                function () use ($arguments, $cacheKey, $method) {
279
+                function() use ($arguments, $cacheKey, $method) {
280 280
                     return [
281 281
                         "key" => $cacheKey,
282 282
                         "value" => parent::{$method}(...$arguments),
Please login to merge, or discard this patch.
src/CacheKey.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function getLimitClause() : string
54 54
     {
55
-        if (! property_exists($this->query, "limit")
56
-            || ! $this->query->limit
55
+        if (!property_exists($this->query, "limit")
56
+            || !$this->query->limit
57 57
         ) {
58 58
             return "";
59 59
         }
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 
75 75
     protected function getOffsetClause() : string
76 76
     {
77
-        if (! property_exists($this->query, "offset")
78
-            || ! $this->query->offset
77
+        if (!property_exists($this->query, "offset")
78
+            || !$this->query->offset
79 79
         ) {
80 80
             return "";
81 81
         }
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 
86 86
     protected function getOrderByClauses() : string
87 87
     {
88
-        if (! property_exists($this->query, "orders")
89
-            || ! $this->query->orders
88
+        if (!property_exists($this->query, "orders")
89
+            || !$this->query->orders
90 90
         ) {
91 91
             return "";
92 92
         }
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         $orders = collect($this->query->orders);
95 95
 
96 96
         return $orders
97
-            ->reduce(function ($carry, $order) {
97
+            ->reduce(function($carry, $order) {
98 98
                 if (($order["type"] ?? "") === "Raw") {
99
-                    return $carry . "_orderByRaw_" . (new Str)->slug($order["sql"]);
99
+                    return $carry."_orderByRaw_".(new Str)->slug($order["sql"]);
100 100
                 }
101 101
 
102
-                return $carry . "_orderBy_" . $order["column"] . "_" . $order["direction"];
102
+                return $carry."_orderBy_".$order["column"]."_".$order["direction"];
103 103
             })
104 104
             ?: "";
105 105
     }
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
     {
109 109
         if (($columns === ["*"]
110 110
                 || $columns === [])
111
-            && (! property_exists($this->query, "columns")
112
-                || ! $this->query->columns)
111
+            && (!property_exists($this->query, "columns")
112
+                || !$this->query->columns)
113 113
         ) {
114 114
             return "";
115 115
         }
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
         if (property_exists($this->query, "columns")
118 118
             && $this->query->columns
119 119
         ) {
120
-            return "_" . implode("_", $this->query->columns);
120
+            return "_".implode("_", $this->query->columns);
121 121
         }
122 122
 
123
-        return "_" . implode("_", $columns);
123
+        return "_".implode("_", $columns);
124 124
     }
125 125
 
126 126
     protected function getTypeClause($where) : string
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
     protected function getValuesClause(array $where = []) : string
136 136
     {
137
-        if (! $where
137
+        if (!$where
138 138
             || in_array($where["type"], ["NotNull", "Null"])
139 139
         ) {
140 140
             return "";
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $values = $this->getValuesFromWhere($where);
144 144
         $values = $this->getValuesFromBindings($where, $values);
145 145
 
146
-        return "_" . $values;
146
+        return "_".$values;
147 147
     }
148 148
 
149 149
     protected function getValuesFromWhere(array $where) : string
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $this->currentBinding++;
163 163
 
164 164
             if ($where["type"] === "between") {
165
-                $values .= "_" . $this->query->bindings["where"][$this->currentBinding];
165
+                $values .= "_".$this->query->bindings["where"][$this->currentBinding];
166 166
                 $this->currentBinding++;
167 167
             }
168 168
         }
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 
173 173
     protected function getWhereClauses(array $wheres = []) : string
174 174
     {
175
-        return "" . $this->getWheres($wheres)
176
-            ->reduce(function ($carry, $where) {
175
+        return "".$this->getWheres($wheres)
176
+            ->reduce(function($carry, $where) {
177 177
                 $value = $carry;
178 178
                 $value .= $this->getNestedClauses($where);
179 179
                 $value .= $this->getColumnClauses($where);
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 
188 188
     protected function getNestedClauses(array $where) : string
189 189
     {
190
-        if (! in_array($where["type"], ["Exists", "Nested", "NotExists"])) {
190
+        if (!in_array($where["type"], ["Exists", "Nested", "NotExists"])) {
191 191
             return "";
192 192
         }
193 193
 
194
-        return "-" . strtolower($where["type"]) . $this->getWhereClauses($where["query"]->wheres);
194
+        return "-".strtolower($where["type"]).$this->getWhereClauses($where["query"]->wheres);
195 195
     }
196 196
 
197 197
     protected function getColumnClauses(array $where) : string
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
     protected function getInAndNotInClauses(array $where) : string
207 207
     {
208
-        if (! in_array($where["type"], ["In", "NotIn", "InRaw"])) {
208
+        if (!in_array($where["type"], ["In", "NotIn", "InRaw"])) {
209 209
             return "";
210 210
         }
211 211
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                 continue;
240 240
             }
241 241
 
242
-            $result .= $glue . $value;
242
+            $result .= $glue.$value;
243 243
         }
244 244
 
245 245
         return $result;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
     protected function getRawClauses(array $where) : string
249 249
     {
250
-        if (! in_array($where["type"], ["raw"])) {
250
+        if (!in_array($where["type"], ["raw"])) {
251 251
             return "";
252 252
         }
253 253
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $clause = "_{$where["boolean"]}";
256 256
 
257 257
         while (count($queryParts) > 1) {
258
-            $clause .= "_" . array_shift($queryParts);
258
+            $clause .= "_".array_shift($queryParts);
259 259
             $clause .= $this->query->bindings["where"][$this->currentBinding];
260 260
             $this->currentBinding++;
261 261
         }
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
         $lastPart = array_shift($queryParts);
264 264
 
265 265
         if ($lastPart) {
266
-            $clause .= "_" . $lastPart;
266
+            $clause .= "_".$lastPart;
267 267
         }
268 268
 
269
-        return "-" . str_replace(" ", "_", $clause);
269
+        return "-".str_replace(" ", "_", $clause);
270 270
     }
271 271
 
272 272
     protected function getOtherClauses(array $where) : string
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
             return "";
303 303
         }
304 304
 
305
-        return $eagerLoads->keys()->reduce(function ($carry, $related) {
306
-            if (! method_exists($this->model, $related)) {
305
+        return $eagerLoads->keys()->reduce(function($carry, $related) {
306
+            if (!method_exists($this->model, $related)) {
307 307
                 return "{$carry}-{$related}";
308 308
             }
309 309
 
Please login to merge, or discard this patch.
src/Traits/CachePrefixing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
             ->get("laravel-model-caching.use-database-keying");
13 13
 
14 14
         if ($useDatabaseKeying) {
15
-            $cachePrefix .= $this->getConnectionName() . ":";
16
-            $cachePrefix .= $this->getDatabaseName() . ":";
15
+            $cachePrefix .= $this->getConnectionName().":";
16
+            $cachePrefix .= $this->getDatabaseName().":";
17 17
         }
18 18
 
19 19
         $cachePrefix .= Container::getInstance()
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         if ($this->model
24 24
             && property_exists($this->model, "cachePrefix")
25 25
         ) {
26
-            $cachePrefix .= $this->model->cachePrefix . ":";
26
+            $cachePrefix .= $this->model->cachePrefix.":";
27 27
         }
28 28
 
29 29
         return $cachePrefix;
Please login to merge, or discard this patch.
src/Traits/ModelCaching.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             ->make("config")
45 45
             ->get("laravel-model-caching.enabled");
46 46
 
47
-        if (! $cacheIsEnabled) {
47
+        if (!$cacheIsEnabled) {
48 48
             return parent::all($columns);
49 49
         }
50 50
 
@@ -54,22 +54,22 @@  discard block
 block discarded – undo
54 54
         $key = $instance->makeCacheKey();
55 55
 
56 56
         return $instance->cache($tags)
57
-            ->rememberForever($key, function () use ($columns) {
57
+            ->rememberForever($key, function() use ($columns) {
58 58
                 return parent::all($columns);
59 59
             });
60 60
     }
61 61
 
62 62
     public static function bootCachable()
63 63
     {
64
-        static::created(function ($instance) {
64
+        static::created(function($instance) {
65 65
             $instance->checkCooldownAndFlushAfterPersisting($instance);
66 66
         });
67 67
 
68
-        static::deleted(function ($instance) {
68
+        static::deleted(function($instance) {
69 69
             $instance->checkCooldownAndFlushAfterPersisting($instance);
70 70
         });
71 71
 
72
-        static::saved(function ($instance) {
72
+        static::saved(function($instance) {
73 73
             $instance->checkCooldownAndFlushAfterPersisting($instance);
74 74
         });
75 75
 
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
         //     $instance->checkCooldownAndFlushAfterPersisting($instance);
79 79
         // });
80 80
 
81
-        static::pivotAttached(function ($instance, $secondInstance, $relationship) {
81
+        static::pivotAttached(function($instance, $secondInstance, $relationship) {
82 82
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
83 83
         });
84 84
 
85
-        static::pivotDetached(function ($instance, $secondInstance, $relationship) {
85
+        static::pivotDetached(function($instance, $secondInstance, $relationship) {
86 86
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
87 87
         });
88 88
 
89
-        static::pivotUpdated(function ($instance, $secondInstance, $relationship) {
89
+        static::pivotUpdated(function($instance, $secondInstance, $relationship) {
90 90
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
91 91
         });
92 92
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     public function newEloquentBuilder($query)
104 104
     {
105
-        if (! $this->isCachable()) {
105
+        if (!$this->isCachable()) {
106 106
             $this->isCachable = false;
107 107
 
108 108
             return new EloquentBuilder($query);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         EloquentBuilder $query,
162 162
         int $seconds = null
163 163
     ) : EloquentBuilder {
164
-        if (! $seconds) {
164
+        if (!$seconds) {
165 165
             $seconds = $this->cacheCooldownSeconds;
166 166
         }
167 167
 
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:seconds";
171 171
 
172 172
         $this->cache()
173
-            ->rememberForever($cacheKey, function () use ($seconds) {
173
+            ->rememberForever($cacheKey, function() use ($seconds) {
174 174
                 return $seconds;
175 175
             });
176 176
 
177 177
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:invalidated-at";
178 178
         $this->cache()
179
-            ->rememberForever($cacheKey, function () {
179
+            ->rememberForever($cacheKey, function() {
180 180
                 return (new Carbon)->now();
181 181
             });
182 182
 
Please login to merge, or discard this patch.
src/Providers/Service.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public function boot()
13 13
     {
14
-        $configPath = __DIR__ . '/../../config/laravel-model-caching.php';
14
+        $configPath = __DIR__.'/../../config/laravel-model-caching.php';
15 15
         $this->mergeConfigFrom($configPath, 'laravel-model-caching');
16 16
         $this->commands([
17 17
             Clear::class,
Please login to merge, or discard this patch.
src/Traits/Caching.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,18 +34,18 @@  discard block
 block discarded – undo
34 34
 
35 35
     protected function applyScopesToInstance()
36 36
     {
37
-        if (! property_exists($this, "scopes")
37
+        if (!property_exists($this, "scopes")
38 38
             || $this->scopesAreApplied
39 39
         ) {
40 40
             return;
41 41
         }
42 42
 
43 43
         foreach ($this->scopes as $identifier => $scope) {
44
-            if (! isset($this->scopes[$identifier])) {
44
+            if (!isset($this->scopes[$identifier])) {
45 45
                 continue;
46 46
             }
47 47
 
48
-            $this->callScope(function () use ($scope) {
48
+            $this->callScope(function() use ($scope) {
49 49
                 if ($scope instanceof Closure) {
50 50
                     $scope($this);
51 51
                 }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:saved-at";
104 104
 
105 105
             $this->cache()
106
-                ->rememberForever($cacheKey, function () {
106
+                ->rememberForever($cacheKey, function() {
107 107
                     return (new Carbon)->now();
108 108
                 });
109 109
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
     public function getModelCacheCooldown(Model $instance) : array
182 182
     {
183
-        if (! $instance->cacheCooldownSeconds) {
183
+        if (!$instance->cacheCooldownSeconds) {
184 184
             return [null, null, null];
185 185
         }
186 186
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         [$cacheCooldown, $invalidatedAt, $savedAt] = $this
190 190
             ->getCacheCooldownDetails($instance, $cachePrefix, $modelClassName);
191 191
 
192
-        if (! $cacheCooldown || $cacheCooldown === 0) {
192
+        if (!$cacheCooldown || $cacheCooldown === 0) {
193 193
             return [null, null, null];
194 194
         }
195 195
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     {
219 219
         [$cacheCooldown, $invalidatedAt] = $this->getModelCacheCooldown($instance);
220 220
 
221
-        if (! $cacheCooldown
221
+        if (!$cacheCooldown
222 222
             || (new Carbon)->now()->diffInSeconds($invalidatedAt) < $cacheCooldown
223 223
         ) {
224 224
             return;
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     {
244 244
         [$cacheCooldown, $invalidatedAt] = $instance->getModelCacheCooldown($instance);
245 245
 
246
-        if (! $cacheCooldown) {
246
+        if (!$cacheCooldown) {
247 247
             $instance->flushCache();
248 248
 
249 249
             if ($relationship) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
     public function isCachable() : bool
272 272
     {
273
-        $isCacheDisabled = ! Container::getInstance()
273
+        $isCacheDisabled = !Container::getInstance()
274 274
             ->make("config")
275 275
             ->get("laravel-model-caching.enabled");
276 276
         $allRelationshipsAreCachable = true;
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
             $allRelationshipsAreCachable = collect($this
282 282
                 ->eagerLoad)
283 283
                 ->keys()
284
-                ->reduce(function ($carry, $related) {
285
-                    if (! method_exists($this, $related)
284
+                ->reduce(function($carry, $related) {
285
+                    if (!method_exists($this, $related)
286 286
                         || $carry === false
287 287
                     ) {
288 288
                         return $carry;
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
         
291 291
                     $relatedModel = $this->model->$related()->getRelated();
292 292
 
293
-                    if (! method_exists($relatedModel, "isCachable")
294
-                        || ! $relatedModel->isCachable()
293
+                    if (!method_exists($relatedModel, "isCachable")
294
+                        || !$relatedModel->isCachable()
295 295
                     ) {
296 296
                         return false;
297 297
                     }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         }
303 303
 
304 304
         return $this->isCachable
305
-            && ! $isCacheDisabled
305
+            && !$isCacheDisabled
306 306
             && $allRelationshipsAreCachable;
307 307
     }
308 308
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:saved-at";
314 314
 
315 315
         $instance->cache()
316
-            ->rememberForever($cacheKey, function () {
316
+            ->rememberForever($cacheKey, function() {
317 317
                 return (new Carbon)->now();
318 318
             });
319 319
     }
Please login to merge, or discard this patch.