Passed
Push — master ( 436057...7b94bf )
by Iman
02:27
created
src/Utils/Normalizers/ControllerNormalizer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     private function checkControllerExists(string $ctrlClass): void
28 28
     {
29
-        if (! class_exists($ctrlClass)) {
29
+        if (!class_exists($ctrlClass)) {
30 30
             throw new \InvalidArgumentException("Controller class: [{$ctrlClass}] not found.");
31 31
         }
32 32
     }
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     private function checkDataMethodExists(string $ctrlClass): void
38 38
     {
39
-        if (! method_exists($ctrlClass, 'data')) {
40
-            throw new \InvalidArgumentException("'data' method not found on ".$ctrlClass);
39
+        if (!method_exists($ctrlClass, 'data')) {
40
+            throw new \InvalidArgumentException("'data' method not found on " . $ctrlClass);
41 41
         }
42 42
     }
43 43
 
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
         // We decide to call data method on widget object by default.
51 51
         // If the user has explicitly declared controller class path on widget
52 52
         // then we decide to call data method on that instead.
53
-        if (! property_exists($widget, 'controller')) {
53
+        if (!property_exists($widget, 'controller')) {
54 54
             return [[$widget, 'data'], get_class($widget)];
55 55
         }
56 56
 
57 57
         if (is_string($widget->controller)) {
58
-            if (! str_contains($widget->controller, '@')) {
59
-                return [$widget->controller.'@data', $widget->controller];
58
+            if (!str_contains($widget->controller, '@')) {
59
+                return [$widget->controller . '@data', $widget->controller];
60 60
             }
61 61
             $widget->controller = explode('@', $widget->controller);
62 62
         }
Please login to merge, or discard this patch.