Test Failed
Pull Request — master (#68)
by yasin
02:44
created
src/Utils/SlotRenderer.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@
 block discarded – undo
4 4
 
5 5
 trait SlotRenderer
6 6
 {
7
-	protected $slotName;
7
+    protected $slotName;
8 8
 
9
-	protected $slots = [];
9
+    protected $slots = [];
10 10
 
11
-	public function startSlot($name)
12
-	{
13
-		if (ob_start()) {
14
-			$this->slotName = $name;
15
-		}
16
-	}
11
+    public function startSlot($name)
12
+    {
13
+        if (ob_start()) {
14
+            $this->slotName = $name;
15
+        }
16
+    }
17 17
 
18
-	public function renderSlot($data)
19
-	{
20
-		$this->slots[$this->slotName] = $data ?? "";
21
-	}
18
+    public function renderSlot($data)
19
+    {
20
+        $this->slots[$this->slotName] = $data ?? "";
21
+    }
22 22
 
23
-	public function hasSlot()
24
-	{
25
-		return !empty($this->slots);
26
-	}
23
+    public function hasSlot()
24
+    {
25
+        return !empty($this->slots);
26
+    }
27 27
 
28
-	/**
29
-	 * Assign slots to $_viewData
30
-	 */
31
-	private function assignSlots()
32
-	{
33
-		if ($this->hasSlot())
34
-			$this->_viewData = array_merge($this->_viewData, $this->slots);
35
-	}
28
+    /**
29
+     * Assign slots to $_viewData
30
+     */
31
+    private function assignSlots()
32
+    {
33
+        if ($this->hasSlot())
34
+            $this->_viewData = array_merge($this->_viewData, $this->slots);
35
+    }
36 36
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
 	 */
31 31
 	private function assignSlots()
32 32
 	{
33
-		if ($this->hasSlot())
34
-			$this->_viewData = array_merge($this->_viewData, $this->slots);
33
+		if ($this->hasSlot()) {
34
+					$this->_viewData = array_merge($this->_viewData, $this->slots);
35
+		}
35 36
 	}
36 37
 }
Please login to merge, or discard this patch.
src/WidgetsServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  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
             if (strpos($expression, 'slotable') == false) {
46 46
                 return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         $this->defineSlotDirectives($omitParenthesis);
52 52
 
53
-        Blade::directive('endwidget', function () {
53
+        Blade::directive('endwidget', function() {
54 54
             $expression = $this->expression;
55 55
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
56 56
         });
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
      */
69 69
     private function defineSlotDirectives($omitParenthesis)
70 70
     {
71
-        Blade::directive('slot', function ($slotName) use ($omitParenthesis) {
71
+        Blade::directive('slot', function($slotName) use ($omitParenthesis) {
72 72
             $slotName = $omitParenthesis ? $slotName : "($slotName)";
73 73
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->startSlot{$slotName};?>";
74 74
         });
75 75
 
76
-        Blade::directive('endslot', function () {
76
+        Blade::directive('endslot', function() {
77 77
             $contentKey = '$content';
78 78
             return "<?php 
79 79
                         $contentKey = ob_get_clean();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             return;
102 102
         }
103 103
 
104
-        $this->app->singleton('widgetize.debugger', function () {
104
+        $this->app->singleton('widgetize.debugger', function() {
105 105
             return new MessagesCollector('Widgets');
106 106
         });
107 107
 
Please login to merge, or discard this patch.