@@ -20,22 +20,22 @@ discard block |
||
20 | 20 | $key = $instance->makeCacheKey(); |
21 | 21 | |
22 | 22 | return $instance->cache($tags) |
23 | - ->rememberForever($key, function () use ($columns) { |
|
23 | + ->rememberForever($key, function() use ($columns) { |
|
24 | 24 | return parent::all($columns); |
25 | 25 | }); |
26 | 26 | } |
27 | 27 | |
28 | 28 | public static function bootCachable() |
29 | 29 | { |
30 | - static::created(function ($instance) { |
|
30 | + static::created(function($instance) { |
|
31 | 31 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
32 | 32 | }); |
33 | 33 | |
34 | - static::deleted(function ($instance) { |
|
34 | + static::deleted(function($instance) { |
|
35 | 35 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
36 | 36 | }); |
37 | 37 | |
38 | - static::saved(function ($instance) { |
|
38 | + static::saved(function($instance) { |
|
39 | 39 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
40 | 40 | }); |
41 | 41 | |
@@ -44,15 +44,15 @@ discard block |
||
44 | 44 | // $instance->checkCooldownAndFlushAfterPersisting($instance); |
45 | 45 | // }); |
46 | 46 | |
47 | - static::pivotAttached(function ($instance) { |
|
47 | + static::pivotAttached(function($instance) { |
|
48 | 48 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
49 | 49 | }); |
50 | 50 | |
51 | - static::pivotDetached(function ($instance) { |
|
51 | + static::pivotDetached(function($instance) { |
|
52 | 52 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
53 | 53 | }); |
54 | 54 | |
55 | - static::pivotUpdated(function ($instance) { |
|
55 | + static::pivotUpdated(function($instance) { |
|
56 | 56 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
57 | 57 | }); |
58 | 58 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function newEloquentBuilder($query) |
70 | 70 | { |
71 | - if (! $this->isCachable()) { |
|
71 | + if (!$this->isCachable()) { |
|
72 | 72 | $this->isCachable = false; |
73 | 73 | |
74 | 74 | return new EloquentBuilder($query); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | EloquentBuilder $query, |
91 | 91 | int $seconds = null |
92 | 92 | ) : EloquentBuilder { |
93 | - if (! $seconds) { |
|
93 | + if (!$seconds) { |
|
94 | 94 | $seconds = $this->cacheCooldownSeconds; |
95 | 95 | } |
96 | 96 | |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:seconds"; |
100 | 100 | |
101 | 101 | $this->cache() |
102 | - ->rememberForever($cacheKey, function () use ($seconds) { |
|
102 | + ->rememberForever($cacheKey, function() use ($seconds) { |
|
103 | 103 | return $seconds; |
104 | 104 | }); |
105 | 105 | |
106 | 106 | $cacheKey = "{$cachePrefix}:{$modelClassName}-cooldown:invalidated-at"; |
107 | 107 | $this->cache() |
108 | - ->rememberForever($cacheKey, function () { |
|
108 | + ->rememberForever($cacheKey, function() { |
|
109 | 109 | return (new Carbon)->now(); |
110 | 110 | }); |
111 | 111 |