@@ -26,7 +26,7 @@ discard block |
||
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 | } |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | private function checkDataMethodExists(string $ctrlClass): void |
38 | 38 | { |
39 | 39 | [$ctrlClass, $method] = explode('@', $ctrlClass); |
40 | - if (! method_exists($ctrlClass, $method)) { |
|
41 | - throw new \InvalidArgumentException("'data' method not found on ".$ctrlClass); |
|
40 | + if (!method_exists($ctrlClass, $method)) { |
|
41 | + throw new \InvalidArgumentException("'data' method not found on " . $ctrlClass); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | // We decide to call data method on widget object by default. |
52 | 52 | // If the user has explicitly declared controller class path on widget |
53 | 53 | // then we decide to call data method on that instead. |
54 | - if (! property_exists($widget, 'controller')) { |
|
54 | + if (!property_exists($widget, 'controller')) { |
|
55 | 55 | return [[$widget, 'data'], get_class($widget)]; |
56 | 56 | } |
57 | 57 | |
58 | 58 | if (is_string($widget->controller)) { |
59 | - if (! str_contains($widget->controller, '@')) { |
|
60 | - return [$widget->controller.'@data', $widget->controller]; |
|
59 | + if (!str_contains($widget->controller, '@')) { |
|
60 | + return [$widget->controller . '@data', $widget->controller]; |
|
61 | 61 | } |
62 | 62 | $widget->controller = explode('@', $widget->controller); |
63 | 63 | } |