Completed
Pull Request — master (#170)
by Nekrasov
17s
created
src/Factories/WidgetFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Console/WidgetMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/WidgetGroupTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $this->widgetGroup->addWidget('Slider', ['slides' => 5]);
104 104
         $this->widgetGroup->addAsyncWidget('Slider');
105 105
 
106
-        $output = $this->widgetGroup->wrap(function ($content, $index, $count) {
106
+        $output = $this->widgetGroup->wrap(function($content, $index, $count) {
107 107
             return "<div class='widget widget-{$index}-{$count}'>{$content}</div>";
108 108
         })->display();
109 109
 
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,23 +23,23 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.