@@ -195,7 +195,7 @@ |
||
195 | 195 | |
196 | 196 | // convert to snake_case part by part to avoid unexpected underscores. |
197 | 197 | $nameArray = explode('/', $name); |
198 | - array_walk($nameArray, function (&$part) { |
|
198 | + array_walk($nameArray, function(&$part) { |
|
199 | 199 | $part = snake_case($part); |
200 | 200 | }); |
201 | 201 |
@@ -24,19 +24,19 @@ discard block |
||
24 | 24 | __DIR__.'/config/config.php', 'laravel-widgets' |
25 | 25 | ); |
26 | 26 | |
27 | - $this->app->bind('arrilot.widget', function () { |
|
27 | + $this->app->bind('arrilot.widget', function() { |
|
28 | 28 | return new WidgetFactory(new LaravelApplicationWrapper()); |
29 | 29 | }); |
30 | 30 | |
31 | - $this->app->bind('arrilot.async-widget', function () { |
|
31 | + $this->app->bind('arrilot.async-widget', function() { |
|
32 | 32 | return new AsyncWidgetFactory(new LaravelApplicationWrapper()); |
33 | 33 | }); |
34 | 34 | |
35 | - $this->app->singleton('arrilot.widget-group-collection', function () { |
|
35 | + $this->app->singleton('arrilot.widget-group-collection', function() { |
|
36 | 36 | return new WidgetGroupCollection(new LaravelApplicationWrapper()); |
37 | 37 | }); |
38 | 38 | |
39 | - $this->app->singleton('command.widget.make', function ($app) { |
|
39 | + $this->app->singleton('command.widget.make', function($app) { |
|
40 | 40 | return new WidgetMakeCommand($app['files']); |
41 | 41 | }); |
42 | 42 | |
@@ -65,26 +65,26 @@ discard block |
||
65 | 65 | ]; |
66 | 66 | |
67 | 67 | if (!$this->app->routesAreCached()) { |
68 | - $this->app['router']->group($routeConfig, function ($router) { |
|
68 | + $this->app['router']->group($routeConfig, function($router) { |
|
69 | 69 | $router->get('load-widget', 'WidgetController@showWidget'); |
70 | 70 | }); |
71 | 71 | } |
72 | 72 | |
73 | 73 | $omitParenthesis = version_compare($this->app->version(), '5.3', '<'); |
74 | 74 | |
75 | - Blade::directive('widget', function ($expression) use ($omitParenthesis) { |
|
75 | + Blade::directive('widget', function($expression) use ($omitParenthesis) { |
|
76 | 76 | $expression = $omitParenthesis ? $expression : "($expression)"; |
77 | 77 | |
78 | 78 | return "<?php echo app('arrilot.widget')->run{$expression}; ?>"; |
79 | 79 | }); |
80 | 80 | |
81 | - Blade::directive('asyncWidget', function ($expression) use ($omitParenthesis) { |
|
81 | + Blade::directive('asyncWidget', function($expression) use ($omitParenthesis) { |
|
82 | 82 | $expression = $omitParenthesis ? $expression : "($expression)"; |
83 | 83 | |
84 | 84 | return "<?php echo app('arrilot.async-widget')->run{$expression}; ?>"; |
85 | 85 | }); |
86 | 86 | |
87 | - Blade::directive('widgetGroup', function ($expression) use ($omitParenthesis) { |
|
87 | + Blade::directive('widgetGroup', function($expression) use ($omitParenthesis) { |
|
88 | 88 | $expression = $omitParenthesis ? $expression : "($expression)"; |
89 | 89 | |
90 | 90 | return "<?php echo app('arrilot.widget-group-collection')->group{$expression}->display(); ?>"; |
@@ -67,7 +67,7 @@ |
||
67 | 67 | protected function getContentFromCache($args) |
68 | 68 | { |
69 | 69 | if ($cacheTime = (float) $this->getCacheTime()) { |
70 | - return $this->app->cache($this->widget->cacheKey($args), $cacheTime, function () { |
|
70 | + return $this->app->cache($this->widget->cacheKey($args), $cacheTime, function() { |
|
71 | 71 | return $this->getContent(); |
72 | 72 | }); |
73 | 73 | } |