@@ -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, $this->widget->cacheTags(), function () { |
|
| 70 | + return $this->app->cache($this->widget->cacheKey($args), $cacheTime, $this->widget->cacheTags(), function() { |
|
| 71 | 71 | return $this->getContent(); |
| 72 | 72 | }); |
| 73 | 73 | } |
@@ -223,7 +223,7 @@ |
||
| 223 | 223 | |
| 224 | 224 | // convert to snake_case part by part to avoid unexpected underscores. |
| 225 | 225 | $nameArray = explode('/', $name); |
| 226 | - array_walk($nameArray, function (&$part) { |
|
| 226 | + array_walk($nameArray, function(&$part) { |
|
| 227 | 227 | $part = Str::snake($part); |
| 228 | 228 | }); |
| 229 | 229 | |
@@ -23,23 +23,23 @@ discard block |
||
| 23 | 23 | 'laravel-widgets' |
| 24 | 24 | ); |
| 25 | 25 | |
| 26 | - $this->app->bind('arrilot.widget', function () { |
|
| 26 | + $this->app->bind('arrilot.widget', function() { |
|
| 27 | 27 | return new WidgetFactory(new LaravelApplicationWrapper()); |
| 28 | 28 | }); |
| 29 | 29 | |
| 30 | - $this->app->bind('arrilot.async-widget', function () { |
|
| 30 | + $this->app->bind('arrilot.async-widget', function() { |
|
| 31 | 31 | return new AsyncWidgetFactory(new LaravelApplicationWrapper()); |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | - $this->app->singleton('arrilot.widget-group-collection', function () { |
|
| 34 | + $this->app->singleton('arrilot.widget-group-collection', function() { |
|
| 35 | 35 | return new WidgetGroupCollection(new LaravelApplicationWrapper()); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - $this->app->singleton('arrilot.widget-namespaces', function () { |
|
| 38 | + $this->app->singleton('arrilot.widget-namespaces', function() { |
|
| 39 | 39 | return new NamespacesRepository(); |
| 40 | 40 | }); |
| 41 | 41 | |
| 42 | - $this->app->singleton('command.widget.make', function ($app) { |
|
| 42 | + $this->app->singleton('command.widget.make', function($app) { |
|
| 43 | 43 | return new WidgetMakeCommand($app['files']); |
| 44 | 44 | }); |
| 45 | 45 | |
@@ -68,20 +68,20 @@ discard block |
||
| 68 | 68 | ]; |
| 69 | 69 | |
| 70 | 70 | if (!$this->app instanceof CachesRoutes || !$this->app->routesAreCached()) { |
| 71 | - $this->app['router']->group($routeConfig, function ($router) { |
|
| 71 | + $this->app['router']->group($routeConfig, function($router) { |
|
| 72 | 72 | $router->get('load-widget', 'WidgetController@showWidget'); |
| 73 | 73 | }); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - Blade::directive('widget', function ($expression) { |
|
| 76 | + Blade::directive('widget', function($expression) { |
|
| 77 | 77 | return "<?php echo app('arrilot.widget')->run($expression); ?>"; |
| 78 | 78 | }); |
| 79 | 79 | |
| 80 | - Blade::directive('asyncWidget', function ($expression) { |
|
| 80 | + Blade::directive('asyncWidget', function($expression) { |
|
| 81 | 81 | return "<?php echo app('arrilot.async-widget')->run($expression); ?>"; |
| 82 | 82 | }); |
| 83 | 83 | |
| 84 | - Blade::directive('widgetGroup', function ($expression) { |
|
| 84 | + Blade::directive('widgetGroup', function($expression) { |
|
| 85 | 85 | return "<?php echo app('arrilot.widget-group-collection')->group($expression)->display(); ?>"; |
| 86 | 86 | }); |
| 87 | 87 | } |