Completed
Push — master ( 17b905...687568 )
by Mike
10s
created
src/Traits/ModelCaching.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,22 +18,22 @@  discard block
 block discarded – undo
18 18
         $key = $instance->makeCacheKey();
19 19
 
20 20
         return $instance->cache($tags)
21
-            ->rememberForever($key, function () use ($columns) {
21
+            ->rememberForever($key, function() use ($columns) {
22 22
                 return parent::all($columns);
23 23
             });
24 24
     }
25 25
 
26 26
     public static function bootCachable()
27 27
     {
28
-        static::created(function ($instance) {
28
+        static::created(function($instance) {
29 29
             $instance->checkCooldownAndFlushAfterPersiting($instance);
30 30
         });
31 31
 
32
-        static::deleted(function ($instance) {
32
+        static::deleted(function($instance) {
33 33
             $instance->checkCooldownAndFlushAfterPersiting($instance);
34 34
         });
35 35
 
36
-        static::saved(function ($instance) {
36
+        static::saved(function($instance) {
37 37
             $instance->checkCooldownAndFlushAfterPersiting($instance);
38 38
         });
39 39
 
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
         //     $instance->checkCooldownAndFlushAfterPersiting($instance);
43 43
         // });
44 44
 
45
-        static::pivotAttached(function ($instance) {
45
+        static::pivotAttached(function($instance) {
46 46
             $instance->checkCooldownAndFlushAfterPersiting($instance);
47 47
         });
48 48
 
49
-        static::pivotDetached(function ($instance) {
49
+        static::pivotDetached(function($instance) {
50 50
             $instance->checkCooldownAndFlushAfterPersiting($instance);
51 51
         });
52 52
 
53
-        static::pivotUpdated(function ($instance) {
53
+        static::pivotUpdated(function($instance) {
54 54
             $instance->checkCooldownAndFlushAfterPersiting($instance);
55 55
         });
56 56
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function newEloquentBuilder($query)
68 68
     {
69
-        if (! $this->isCachable()) {
69
+        if (!$this->isCachable()) {
70 70
             $this->isCachable = true;
71 71
 
72 72
             return new EloquentBuilder($query);
@@ -93,13 +93,13 @@  discard block
 block discarded – undo
93 93
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:seconds";
94 94
 
95 95
         $this->cache()
96
-            ->rememberForever($cacheKey, function () use ($seconds) {
96
+            ->rememberForever($cacheKey, function() use ($seconds) {
97 97
                 return $seconds;
98 98
             });
99 99
 
100 100
         $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:invalidated-at";
101 101
         $this->cache()
102
-            ->rememberForever($cacheKey, function () {
102
+            ->rememberForever($cacheKey, function() {
103 103
                 return (new Carbon)->now();
104 104
             });
105 105
 
Please login to merge, or discard this patch.