Passed
Push — master ( 138146...ac4228 )
by Iman
03:15 queued 14s
created
src/Utils/WidgetRenderer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return app($widget);
57 57
         }
58 58
 
59
-        $widget = app()->getNamespace().'Widgets\\'.$widget;
59
+        $widget = app()->getNamespace() . 'Widgets\\' . $widget;
60 60
 
61 61
         return app($widget);
62 62
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     private function generateHtml($widget, ...$args)
73 73
     {
74 74
         // Everything inside this function is executed only when the cache is not available.
75
-        $expensivePhpCode = function () use ($widget, $args) {
75
+        $expensivePhpCode = function() use ($widget, $args) {
76 76
             $this->makeDataForView($widget, $args);
77 77
 
78 78
             // render the template with the resulting data.
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     private function makeDataForView($widget, array $args)
97 97
     {
98
-        $expensiveCode = function () use ($widget, $args) {
98
+        $expensiveCode = function() use ($widget, $args) {
99 99
 
100 100
             // Here we call the data method on the widget class.
101 101
             $viewData = \App::call($widget->controller, ...$args);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return $viewData;
110 110
         };
111 111
 
112
-        if ($this->_policies->widgetShouldUseCache() && ! $widget->cacheView) {
112
+        if ($this->_policies->widgetShouldUseCache() && !$widget->cacheView) {
113 113
             $viewData = app(Cache::class)->cacheResult($args, $expensiveCode, $widget, 'dataProvider');
114 114
         } else {
115 115
             $viewData = $expensiveCode();
Please login to merge, or discard this patch.