@@ -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 | |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | /** |
| 91 | 91 | * Get the services provided by the provider. |
| 92 | 92 | * |
| 93 | - * @return array |
|
| 93 | + * @return string[] |
|
| 94 | 94 | */ |
| 95 | 95 | public function provides() |
| 96 | 96 | { |
@@ -21,19 +21,19 @@ discard block |
||
| 21 | 21 | __DIR__.'/config/config.php', 'laravel-widgets' |
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | - $this->app->bind('arrilot.widget', function () { |
|
| 24 | + $this->app->bind('arrilot.widget', function() { |
|
| 25 | 25 | return new WidgetFactory(new LaravelApplicationWrapper()); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - $this->app->bind('arrilot.async-widget', function () { |
|
| 28 | + $this->app->bind('arrilot.async-widget', function() { |
|
| 29 | 29 | return new AsyncWidgetFactory(new LaravelApplicationWrapper()); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - $this->app->singleton('arrilot.widget-group-collection', function () { |
|
| 32 | + $this->app->singleton('arrilot.widget-group-collection', function() { |
|
| 33 | 33 | return new WidgetGroupCollection(new LaravelApplicationWrapper()); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - $this->app->singleton('command.widget.make', function ($app) { |
|
| 36 | + $this->app->singleton('command.widget.make', function($app) { |
|
| 37 | 37 | return new WidgetMakeCommand($app['files']); |
| 38 | 38 | }); |
| 39 | 39 | |
@@ -62,20 +62,20 @@ discard block |
||
| 62 | 62 | ]; |
| 63 | 63 | |
| 64 | 64 | if (!$this->app->routesAreCached()) { |
| 65 | - $this->app['router']->group($routeConfig, function ($router) { |
|
| 65 | + $this->app['router']->group($routeConfig, function($router) { |
|
| 66 | 66 | $router->get('load-widget', 'WidgetController@showWidget'); |
| 67 | 67 | }); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - Blade::directive('widget', function ($expression) { |
|
| 70 | + Blade::directive('widget', function($expression) { |
|
| 71 | 71 | return "<?php echo app('arrilot.widget')->run($expression); ?>"; |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | - Blade::directive('asyncWidget', function ($expression) { |
|
| 74 | + Blade::directive('asyncWidget', function($expression) { |
|
| 75 | 75 | return "<?php echo app('arrilot.async-widget')->run($expression); ?>"; |
| 76 | 76 | }); |
| 77 | 77 | |
| 78 | - Blade::directive('widgetGroup', function ($expression) { |
|
| 78 | + Blade::directive('widgetGroup', function($expression) { |
|
| 79 | 79 | return "<?php echo app('arrilot.widget-group-collection')->group($expression)->display(); ?>"; |
| 80 | 80 | }); |
| 81 | 81 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * @param $key |
| 28 | 28 | * @param $minutes |
| 29 | 29 | * @param $tags |
| 30 | - * @param callable $callback |
|
| 30 | + * @param Closure $callback |
|
| 31 | 31 | * |
| 32 | 32 | * @return mixed |
| 33 | 33 | */ |
@@ -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 | } |