Completed
Push — master ( 05dd03...c5e7d0 )
by Nekrasov
10s
created
src/Console/WidgetMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Factories/WidgetFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     protected function getContentFromCache($args)
95 95
     {
96 96
         if ($cacheTime = (double) $this->getCacheTime()) {
97
-            return $this->app->cache($this->widget->cacheKey($args), $cacheTime, function () {
97
+            return $this->app->cache($this->widget->cacheKey($args), $cacheTime, function() {
98 98
                 return $this->getContent();
99 99
             });
100 100
         }
Please login to merge, or discard this patch.
src/ServiceProvider.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * Get the services provided by the provider.
75 75
      *
76
-     * @return array
76
+     * @return string[]
77 77
      */
78 78
     public function provides()
79 79
     {
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Register a blade directive.
85 85
      *
86
-     * @param $name
87
-     * @param $expression
86
+     * @param string $name
87
+     * @param string $expression
88 88
      */
89 89
     protected function registerBladeDirective($name, $expression)
90 90
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@  discard block
 block discarded – undo
24 24
             __DIR__.'/config/config.php', 'laravel-widgets'
25 25
         );
26 26
 
27
-        $this->app->bind('arrilot.widget', function () {
27
+        $this->app->bind('arrilot.widget', function() {
28 28
             return new WidgetFactory(new LaravelApplicationWrapper());
29 29
         });
30 30
 
31
-        $this->app->bind('arrilot.async-widget', function () {
31
+        $this->app->bind('arrilot.async-widget', function() {
32 32
             return new AsyncWidgetFactory(new LaravelApplicationWrapper());
33 33
         });
34 34
 
35
-        $this->app->singleton('arrilot.widget-group-collection', function () {
35
+        $this->app->singleton('arrilot.widget-group-collection', function() {
36 36
             return new WidgetGroupCollection(new LaravelApplicationWrapper());
37 37
         });
38 38
 
39
-        $this->app->singleton('command.widget.make', function ($app) {
39
+        $this->app->singleton('command.widget.make', function($app) {
40 40
             return new WidgetMakeCommand($app['files']);
41 41
         });
42 42
 
@@ -65,23 +65,23 @@  discard block
 block discarded – undo
65 65
         ];
66 66
 
67 67
         if (!$this->app->routesAreCached()) {
68
-            $this->app['router']->group($routeConfig, function ($router) {
68
+            $this->app['router']->group($routeConfig, function($router) {
69 69
                 $router->get('load-widget', 'WidgetController@showWidget');
70 70
             });
71 71
         }
72 72
 
73
-        Blade::directive('widget', function ($expression) {
73
+        Blade::directive('widget', function($expression) {
74 74
             return "<?php echo app('arrilot.widget')->run{$expression}; ?>";
75 75
         });
76 76
 
77 77
         // Blade::directive cannot recognize @async-widget, so @async-widget still use the custom matcher.
78 78
         $this->registerBladeDirective('async-widget', '$1<?php echo app("arrilot.async-widget")->run$2; ?>');
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
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function registerBladeDirective($name, $expression)
106 106
     {
107
-        Blade::extend(function ($view) use ($name, $expression) {
107
+        Blade::extend(function($view) use ($name, $expression) {
108 108
             $pattern = $this->createMatcher($name);
109 109
 
110 110
             return preg_replace($pattern, $expression, $view);
Please login to merge, or discard this patch.