@@ -15,17 +15,17 @@ |
||
15 | 15 | public function normalize($widget) : void |
16 | 16 | { |
17 | 17 | // class name without namespace. |
18 | - $className = str_replace(app()->getNamespace().'Widgets\\', '', get_class($widget)); |
|
18 | + $className = str_replace(app()->getNamespace() . 'Widgets\\', '', get_class($widget)); |
|
19 | 19 | |
20 | 20 | // replace slashes with dots |
21 | 21 | $className = str_replace(['\\', '/'], '.', $className); |
22 | 22 | |
23 | - if (! property_exists($widget, 'template')) { |
|
24 | - $widget->template = 'Widgets::'.$className.'View'; |
|
23 | + if (!property_exists($widget, 'template')) { |
|
24 | + $widget->template = 'Widgets::' . $className . 'View'; |
|
25 | 25 | } |
26 | 26 | |
27 | - if (! view()->exists($widget->template)) { |
|
28 | - throw new \InvalidArgumentException("View file \"{$widget->template}\" not found by: '".get_class($widget)." '"); |
|
27 | + if (!view()->exists($widget->template)) { |
|
28 | + throw new \InvalidArgumentException("View file \"{$widget->template}\" not found by: '" . get_class($widget) . " '"); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |