@@ -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 | } |
@@ -36,8 +36,8 @@ discard block |
||
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 |
||
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 | } |