Passed
Push — master ( 2da9e5...353c97 )
by Iman
04:56
created
src/Utils/DebugInfo.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $tpl = $this->getTplPath($this->widget->template);
41 41
 
42
-        $this->html = "<span title='WidgetObj : ".get_class($this->widget).".php&#013;Template : {$tpl}{$this->cacheState()}'>{$this->html}</span>";
42
+        $this->html = "<span title='WidgetObj : " . get_class($this->widget) . ".php&#013;Template : {$tpl}{$this->cacheState()}'>{$this->html}</span>";
43 43
     }
44 44
 
45 45
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function cacheState()
51 51
     {
52
-        if (! $this->policies->widgetShouldUseCache()) {
52
+        if (!$this->policies->widgetShouldUseCache()) {
53 53
             return ' &#013; Cache: is globally turned off (You should put "enable_cache" => true in config\widgetize.php) ';
54 54
         }
55 55
         $l = $this->widget->cacheLifeTime->i ?? 0;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function addHtmlComments(): void
61 61
     {
62
-        $this->html = "<!-- '{".get_class($this->widget)."' Widget Start -->".$this->html."<!-- '".get_class($this->widget)."' Widget End -->";
62
+        $this->html = "<!-- '{" . get_class($this->widget) . "' Widget Start -->" . $this->html . "<!-- '" . get_class($this->widget) . "' Widget End -->";
63 63
     }
64 64
 
65 65
     /**
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
     private function getTplPath(string $tpl)
70 70
     {
71 71
         if (Str::contains($tpl, 'Widgets::')) {
72
-            $tpl = str_replace('Widgets::', app()->getNamespace().'Widgets\\', $tpl);
72
+            $tpl = str_replace('Widgets::', app()->getNamespace() . 'Widgets\\', $tpl);
73 73
         }
74 74
 
75
-        return str_replace('.', '\\', $tpl).'.blade.php';
75
+        return str_replace('.', '\\', $tpl) . '.blade.php';
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/Utils/Normalizers/ControllerNormalizer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     private function checkControllerExists(string $ctrlClass): void
31 31
     {
32
-        if (! class_exists($ctrlClass)) {
32
+        if (!class_exists($ctrlClass)) {
33 33
             throw new \InvalidArgumentException("Controller class: [{$ctrlClass}] not found.");
34 34
         }
35 35
     }
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         [$ctrlClass, $method] = $ctrlClass;
47
-        if (! method_exists($ctrlClass, $method)) {
48
-            throw new \InvalidArgumentException("'data' method not found on ".$ctrlClass);
47
+        if (!method_exists($ctrlClass, $method)) {
48
+            throw new \InvalidArgumentException("'data' method not found on " . $ctrlClass);
49 49
         }
50 50
     }
51 51
 
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         // We decide to call data method on the widget object by default.
59 59
         // If the user has explicitly declared controller class path on
60 60
         // widget then we decide to call data method on that instead.
61
-        if (! property_exists($widget, 'controller')) {
61
+        if (!property_exists($widget, 'controller')) {
62 62
             return method_exists($widget, 'data') ? [[$widget, 'data'], null] : [null, null];
63 63
         }
64 64
 
65 65
         if (is_string($widget->controller)) {
66
-            if (! Str::contains($widget->controller, '@')) {
67
-                return [$widget->controller.'@data', $widget->controller];
66
+            if (!Str::contains($widget->controller, '@')) {
67
+                return [$widget->controller . '@data', $widget->controller];
68 68
             }
69 69
             $widget->controller = explode('@', $widget->controller);
70 70
         } elseif (is_callable($widget->controller)) {
Please login to merge, or discard this patch.