Completed
Push — master ( 59bdcf...77f39a )
by Iman
02:18
created
src/Utils/Normalizers/CacheNormalizer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Utils/Cache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.