@@ -56,7 +56,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |