Completed
Push — master ( dcc220...44f37a )
by Mike
14s queued 11s
created
src/Traits/ModelCaching.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,22 +51,22 @@  discard block
 block discarded – undo
51 51
         $key = $instance->makeCacheKey();
52 52
 
53 53
         return $instance->cache($tags)
54
-            ->rememberForever($key, function () use ($columns) {
54
+            ->rememberForever($key, function() use ($columns) {
55 55
                 return parent::all($columns);
56 56
             });
57 57
     }
58 58
 
59 59
     public static function bootCachable()
60 60
     {
61
-        static::created(function ($instance) {
61
+        static::created(function($instance) {
62 62
             $instance->checkCooldownAndFlushAfterPersisting($instance);
63 63
         });
64 64
 
65
-        static::deleted(function ($instance) {
65
+        static::deleted(function($instance) {
66 66
             $instance->checkCooldownAndFlushAfterPersisting($instance);
67 67
         });
68 68
 
69
-        static::saved(function ($instance) {
69
+        static::saved(function($instance) {
70 70
             $instance->checkCooldownAndFlushAfterPersisting($instance);
71 71
         });
72 72
 
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
         //     $instance->checkCooldownAndFlushAfterPersisting($instance);
76 76
         // });
77 77
 
78
-        static::pivotSynced(function ($instance, $secondInstance, $relationship) {
78
+        static::pivotSynced(function($instance, $secondInstance, $relationship) {
79 79
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
80 80
         });
81 81
 
82
-        static::pivotAttached(function ($instance, $secondInstance, $relationship) {
82
+        static::pivotAttached(function($instance, $secondInstance, $relationship) {
83 83
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
84 84
         });
85 85
 
86
-        static::pivotDetached(function ($instance, $secondInstance, $relationship) {
86
+        static::pivotDetached(function($instance, $secondInstance, $relationship) {
87 87
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
88 88
         });
89 89
 
90
-        static::pivotUpdated(function ($instance, $secondInstance, $relationship) {
90
+        static::pivotUpdated(function($instance, $secondInstance, $relationship) {
91 91
             $instance->checkCooldownAndFlushAfterPersisting($instance, $relationship);
92 92
         });
93 93
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function newEloquentBuilder($query)
105 105
     {
106
-        if (! $this->isCachable()) {
106
+        if (!$this->isCachable()) {
107 107
             $this->isCachable = false;
108 108
 
109 109
             return new EloquentBuilder($query);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         EloquentBuilder $query,
163 163
         int $seconds = null
164 164
     ) : EloquentBuilder {
165
-        if (! $seconds) {
165
+        if (!$seconds) {
166 166
             $seconds = $this->cacheCooldownSeconds;
167 167
         }
168 168
 
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:seconds";
172 172
 
173 173
         $this->cache()
174
-            ->rememberForever($cacheKey, function () use ($seconds) {
174
+            ->rememberForever($cacheKey, function() use ($seconds) {
175 175
                 return $seconds;
176 176
             });
177 177
 
178 178
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:invalidated-at";
179 179
         $this->cache()
180
-            ->rememberForever($cacheKey, function () {
180
+            ->rememberForever($cacheKey, function() {
181 181
                 return (new Carbon)->now();
182 182
             });
183 183
 
Please login to merge, or discard this patch.
tests/Integration/CachedBuilder/BelongsToManyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
             ->sync($newStores->pluck('id'));
199 199
 
200 200
         $this->assertEmpty(array_diff(
201
-            Book::find($bookId)->stores()->pluck((new Store)->getTable() . '.id')->toArray(),
201
+            Book::find($bookId)->stores()->pluck((new Store)->getTable().'.id')->toArray(),
202 202
             $newStores->pluck('id')->toArray()
203 203
         ));
204 204
 
Please login to merge, or discard this patch.