@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public function normalizeCacheLifeTime($widget) |
13 | 13 | { |
14 | - if (! property_exists($widget, 'cacheLifeTime')) { |
|
15 | - $widget->cacheLifeTime = (int) (config('widgetize.default_cache_lifetime', 0)); |
|
14 | + if (!property_exists($widget, 'cacheLifeTime')) { |
|
15 | + $widget->cacheLifeTime = (int)(config('widgetize.default_cache_lifetime', 0)); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if ($widget->cacheLifeTime === 'forever') { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function normalizeCacheTags($widget) |
29 | 29 | { |
30 | - if (! $this->cacheCanUseTags() || ! property_exists($widget, 'cacheTags')) { |
|
30 | + if (!$this->cacheCanUseTags() || !property_exists($widget, 'cacheTags')) { |
|
31 | 31 | return $widget->cacheTags = null; |
32 | 32 | } |
33 | 33 | |
@@ -44,6 +44,6 @@ discard block |
||
44 | 44 | */ |
45 | 45 | private function cacheCanUseTags() |
46 | 46 | { |
47 | - return ! in_array(config('cache.default'), ['file', 'database']); |
|
47 | + return !in_array(config('cache.default'), ['file', 'database']); |
|
48 | 48 | } |
49 | 49 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $cache = app('cache'); |
21 | 21 | |
22 | - if ( !empty($widget->cacheTags) && $this->cacheDriverSupportsTags() ) { |
|
22 | + if (!empty($widget->cacheTags) && $this->cacheDriverSupportsTags()) { |
|
23 | 23 | $cache = $cache->tags($widget->cacheTags); |
24 | 24 | } |
25 | 25 | |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | |
61 | - if(!$this->cacheDriverSupportsTags()){ |
|
61 | + if (!$this->cacheDriverSupportsTags()) { |
|
62 | 62 | $_cache = app('cache'); |
63 | - foreach ($widget->cacheTags as $tag){ |
|
63 | + foreach ($widget->cacheTags as $tag) { |
|
64 | 64 | $_key .= $_cache->get($tag); |
65 | 65 | } |
66 | 66 | } |
@@ -75,6 +75,6 @@ discard block |
||
75 | 75 | */ |
76 | 76 | private function cacheDriverSupportsTags() |
77 | 77 | { |
78 | - return ! in_array(env('CACHE_DRIVER', 'file'), ['file', 'database']); |
|
78 | + return !in_array(env('CACHE_DRIVER', 'file'), ['file', 'database']); |
|
79 | 79 | } |
80 | 80 | } |