@@ -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 |
@@ -225,7 +225,7 @@ |
||
225 | 225 | public function getWidgetNameWithCustomNamespace() |
226 | 226 | { |
227 | 227 | return $this->customWidgetNamespace |
228 | - ? $this->customWidgetNamespace . '::' . $this->widgetName |
|
228 | + ? $this->customWidgetNamespace.'::'.$this->widgetName |
|
229 | 229 | : $this->widgetName; |
230 | 230 | } |
231 | 231 | } |
@@ -22,23 +22,23 @@ discard block |
||
22 | 22 | __DIR__.'/config/config.php', 'laravel-widgets' |
23 | 23 | ); |
24 | 24 | |
25 | - $this->app->bind('arrilot.widget', function () { |
|
25 | + $this->app->bind('arrilot.widget', function() { |
|
26 | 26 | return new WidgetFactory(new LaravelApplicationWrapper()); |
27 | 27 | }); |
28 | 28 | |
29 | - $this->app->bind('arrilot.async-widget', function () { |
|
29 | + $this->app->bind('arrilot.async-widget', function() { |
|
30 | 30 | return new AsyncWidgetFactory(new LaravelApplicationWrapper()); |
31 | 31 | }); |
32 | 32 | |
33 | - $this->app->singleton('arrilot.widget-group-collection', function () { |
|
33 | + $this->app->singleton('arrilot.widget-group-collection', function() { |
|
34 | 34 | return new WidgetGroupCollection(new LaravelApplicationWrapper()); |
35 | 35 | }); |
36 | 36 | |
37 | - $this->app->singleton('arrilot.widget-namespaces', function () { |
|
37 | + $this->app->singleton('arrilot.widget-namespaces', function() { |
|
38 | 38 | return new NamespacesRepository(); |
39 | 39 | }); |
40 | 40 | |
41 | - $this->app->singleton('command.widget.make', function ($app) { |
|
41 | + $this->app->singleton('command.widget.make', function($app) { |
|
42 | 42 | return new WidgetMakeCommand($app['files']); |
43 | 43 | }); |
44 | 44 | |
@@ -67,20 +67,20 @@ discard block |
||
67 | 67 | ]; |
68 | 68 | |
69 | 69 | if (!$this->app->routesAreCached()) { |
70 | - $this->app['router']->group($routeConfig, function ($router) { |
|
70 | + $this->app['router']->group($routeConfig, function($router) { |
|
71 | 71 | $router->get(Config::get('laravel-widgets.url_name', 'load'), 'WidgetController@showWidget'); |
72 | 72 | }); |
73 | 73 | } |
74 | 74 | |
75 | - Blade::directive('widget', function ($expression) { |
|
75 | + Blade::directive('widget', function($expression) { |
|
76 | 76 | return "<?php echo app('arrilot.widget')->run($expression); ?>"; |
77 | 77 | }); |
78 | 78 | |
79 | - Blade::directive('asyncWidget', function ($expression) { |
|
79 | + Blade::directive('asyncWidget', function($expression) { |
|
80 | 80 | return "<?php echo app('arrilot.async-widget')->run($expression); ?>"; |
81 | 81 | }); |
82 | 82 | |
83 | - Blade::directive('widgetGroup', function ($expression) { |
|
83 | + Blade::directive('widgetGroup', function($expression) { |
|
84 | 84 | return "<?php echo app('arrilot.widget-group-collection')->group($expression)->display(); ?>"; |
85 | 85 | }); |
86 | 86 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function __construct(AbstractWidgetFactory $widgetFactory) |
28 | 28 | { |
29 | - $this->ajaxLink = Config::get('laravel-widgets.url_prefix', 'lazyapi') . '/' . Config::get('laravel-widgets.url_name', 'load'); |
|
29 | + $this->ajaxLink = Config::get('laravel-widgets.url_prefix', 'lazyapi').'/'.Config::get('laravel-widgets.url_name', 'load'); |
|
30 | 30 | $this->widgetFactory = $widgetFactory; |
31 | 31 | } |
32 | 32 |