@@ -18,22 +18,22 @@ discard block |
||
| 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->checkCooldownAndFlushAfterPersisting($instance); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - static::deleted(function ($instance) { |
|
| 32 | + static::deleted(function($instance) { |
|
| 33 | 33 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - static::saved(function ($instance) { |
|
| 36 | + static::saved(function($instance) { |
|
| 37 | 37 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 38 | 38 | }); |
| 39 | 39 | |
@@ -42,15 +42,15 @@ discard block |
||
| 42 | 42 | // $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 43 | 43 | // }); |
| 44 | 44 | |
| 45 | - static::pivotAttached(function ($instance) { |
|
| 45 | + static::pivotAttached(function($instance) { |
|
| 46 | 46 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - static::pivotDetached(function ($instance) { |
|
| 49 | + static::pivotDetached(function($instance) { |
|
| 50 | 50 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | - static::pivotUpdated(function ($instance) { |
|
| 53 | + static::pivotUpdated(function($instance) { |
|
| 54 | 54 | $instance->checkCooldownAndFlushAfterPersisting($instance); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 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 |
||
| 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 | |