Completed
Pull Request — master (#158)
by Mihail
15s
created
src/ServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Factories/JavascriptFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Factories/AbstractWidgetFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
     public function getWidgetNameWithCustomNamespace()
222 222
     {
223 223
         return $this->customWidgetNamespace
224
-            ? $this->customWidgetNamespace . '::' . $this->widgetName
224
+            ? $this->customWidgetNamespace.'::'.$this->widgetName
225 225
             : $this->widgetName;
226 226
     }
227 227
 }
Please login to merge, or discard this patch.
src/Factories/AsyncWidgetFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         $this->instantiateWidget(func_get_args());
15 15
 
16 16
         if (!is_object($this->widget)
17
-            || (property_exists($this->widget, 'config') && array_key_exists('disabled',$this->widget->config) && (bool)$this->widget->config['disabled'])) {
17
+            || (property_exists($this->widget, 'config') && array_key_exists('disabled', $this->widget->config) && (bool) $this->widget->config['disabled'])) {
18 18
             return '';
19 19
         }
20 20
 
Please login to merge, or discard this patch.
src/Factories/WidgetFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         // do not process empty/!enabled widgets
55 55
         if (!is_object($this->widget)
56
-            || (property_exists($this->widget, 'config') && array_key_exists('disabled',$this->widget->config) && (bool)$this->widget->config['disabled'])) {
56
+            || (property_exists($this->widget, 'config') && array_key_exists('disabled', $this->widget->config) && (bool) $this->widget->config['disabled'])) {
57 57
             return '';
58 58
         }
59 59
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     protected function getContentFromCache($args)
74 74
     {
75 75
         if ($cacheTime = (float) $this->getCacheTime()) {
76
-            return $this->app->cache($this->widget->cacheKey($args), $cacheTime, $this->widget->cacheTags(), function () {
76
+            return $this->app->cache($this->widget->cacheKey($args), $cacheTime, $this->widget->cacheTags(), function() {
77 77
                 return $this->getContent();
78 78
             });
79 79
         }
Please login to merge, or discard this patch.