Passed
Pull Request — master (#69)
by Iman
03:39 queued 44s
created
src/WidgetsServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
     {
20 20
         $this->_registerDebugbar();
21 21
         $this->publishes([
22
-            __DIR__.'/config/config.php' => config_path('widgetize.php'),
22
+            __DIR__ . '/config/config.php' => config_path('widgetize.php'),
23 23
         ]);
24 24
 
25 25
         $this->defineDirectives();
26
-        $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
26
+        $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets');
27 27
     }
28 28
 
29 29
     /**
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $omitParenthesis = version_compare($this->app->version(), '5.3', '<');
42 42
 
43
-        Blade::directive('widget', function ($expression) use ($omitParenthesis) {
43
+        Blade::directive('widget', function($expression) use ($omitParenthesis) {
44 44
             $expression = $omitParenthesis ? $expression : "($expression)";
45 45
 
46 46
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
47 47
         });
48 48
 
49
-        Blade::directive('slotWidget', function ($expression) use ($omitParenthesis) {
49
+        Blade::directive('slotWidget', function($expression) use ($omitParenthesis) {
50 50
             $this->expression = $omitParenthesis ? $expression : "($expression)";
51 51
         });
52 52
 
53 53
         $this->defineSlotDirectives($omitParenthesis);
54 54
 
55
-        Blade::directive('endSlotWidget', function () {
55
+        Blade::directive('endSlotWidget', function() {
56 56
             $expression = $this->expression;
57 57
 
58 58
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function defineSlotDirectives($omitParenthesis)
73 73
     {
74
-        Blade::directive('slot', function ($slotName) use ($omitParenthesis) {
74
+        Blade::directive('slot', function($slotName) use ($omitParenthesis) {
75 75
             $slotName = $omitParenthesis ? $slotName : "($slotName)";
76 76
 
77 77
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->startSlot{$slotName};?>";
78 78
         });
79 79
 
80
-        Blade::directive('endSlot', function () {
80
+        Blade::directive('endSlot', function() {
81 81
             $contentKey = '$content';
82 82
 
83 83
             return "<?php 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function register()
96 96
     {
97
-        $this->mergeConfigFrom(__DIR__.'/config/config.php', 'widgetize');
97
+        $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'widgetize');
98 98
         $this->commands('command.imanghafoori.widget');
99 99
         app(RouteMacros::class)->registerMacros();
100 100
         app(SingletonServices::class)->registerSingletons($this->app);
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 
103 103
     private function _registerDebugbar()
104 104
     {
105
-        if (! $this->app->offsetExists('debugbar')) {
105
+        if (!$this->app->offsetExists('debugbar')) {
106 106
             return;
107 107
         }
108 108
 
109
-        $this->app->singleton('widgetize.debugger', function () {
109
+        $this->app->singleton('widgetize.debugger', function() {
110 110
             return new MessagesCollector('Widgets');
111 111
         });
112 112
 
Please login to merge, or discard this patch.
src/Utils/SlotRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function hasSlots()
39 39
     {
40
-        return ! empty($this->slots);
40
+        return !empty($this->slots);
41 41
     }
42 42
 
43 43
     /**
Please login to merge, or discard this patch.