Passed
Push — master ( 2eaef0...875cc9 )
by Mike
02:21
created
src/Traits/CachePrefixing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
             : "";
18 18
 
19 19
         return "genealabs:laravel-model-caching:"
20
-            . $this->getConnectionName() . ":"
21
-            . $this->getDatabaseName() . ":"
20
+            . $this->getConnectionName().":"
21
+            . $this->getDatabaseName().":"
22 22
             . $cachePrefix;
23 23
     }
24 24
 
Please login to merge, or discard this patch.
src/Traits/Caching.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:saved-at";
50 50
 
51 51
             $this->cache()
52
-                ->rememberForever($cacheKey, function () {
52
+                ->rememberForever($cacheKey, function() {
53 53
                     return (new Carbon)->now();
54 54
                 });
55 55
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
     public function getModelCacheCooldown(Model $instance) : array
121 121
     {
122
-        if (! $instance->cacheCooldownSeconds) {
122
+        if (!$instance->cacheCooldownSeconds) {
123 123
             return [null, null, null];
124 124
         }
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         [$cacheCooldown, $invalidatedAt, $savedAt] = $this
129 129
             ->getCacheCooldownDetails($instance, $cachePrefix, $modelClassName);
130 130
 
131
-        if (! $cacheCooldown || $cacheCooldown === 0) {
131
+        if (!$cacheCooldown || $cacheCooldown === 0) {
132 132
             return [null, null, null];
133 133
         }
134 134
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         [$cacheCooldown, $invalidatedAt] = $this->getModelCacheCooldown($instance);
159 159
 
160
-        if (! $cacheCooldown
160
+        if (!$cacheCooldown
161 161
             || (new Carbon)->now()->diffInSeconds($invalidatedAt) < $cacheCooldown
162 162
         ) {
163 163
             return;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         [$cacheCooldown, $invalidatedAt] = $instance->getModelCacheCooldown($instance);
184 184
 
185
-        if (! $cacheCooldown) {
185
+        if (!$cacheCooldown) {
186 186
             $instance->flushCache();
187 187
 
188 188
             if ($relationship) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     public function isCachable() : bool
207 207
     {
208 208
         return $this->isCachable
209
-            && ! config('laravel-model-caching.disabled');
209
+            && !config('laravel-model-caching.disabled');
210 210
     }
211 211
 
212 212
     protected function setCacheCooldownSavedAtTimestamp(Model $instance)
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:saved-at";
217 217
 
218 218
         $instance->cache()
219
-            ->rememberForever($cacheKey, function () {
219
+            ->rememberForever($cacheKey, function() {
220 220
                 return (new Carbon)->now();
221 221
             });
222 222
     }
Please login to merge, or discard this patch.