@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $pattern = "/<\s*{$component->getTag()}\s*(?<attributes>(?:\s+[\w\-:]+(=(?:\\\"[^\\\"]+\\\"|\'[^\']+\'|[^\'\\\"=<>]+))?)*\s*)\/>/"; |
45 | 45 | |
46 | - return preg_replace_callback($pattern, function (array $matches) use ($component) { |
|
46 | + return preg_replace_callback($pattern, function(array $matches) use ($component) { |
|
47 | 47 | $attributes = $this->getAttributesFromAttributeString($matches['attributes']); |
48 | 48 | |
49 | 49 | return $this->componentString($component, $attributes); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $pattern = "/<\s*{$component->getTag()}(?<attributes>(?:\s+[\w\-:]+(=(?:\\\"[^\\\"]*\\\"|\'[^\']*\'|[^\'\\\"=<>]+))?)*\s*)(?<![\/=\-])>/"; |
56 | 56 | |
57 | - return preg_replace_callback($pattern, function (array $matches) use ($component) { |
|
57 | + return preg_replace_callback($pattern, function(array $matches) use ($component) { |
|
58 | 58 | $attributes = $this->getAttributesFromAttributeString($matches['attributes']); |
59 | 59 | |
60 | 60 | return $this->componentString($component, $attributes); |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | |
83 | 83 | $pattern = '/(?<attribute>[\w:-]+)(=(?<value>(\"[^\"]+\"|\\\'[^\\\']+\\\'|[^\s>]+)))?/'; |
84 | 84 | |
85 | - if (! preg_match_all($pattern, $attributeString, $matches, PREG_SET_ORDER)) { |
|
85 | + if (!preg_match_all($pattern, $attributeString, $matches, PREG_SET_ORDER)) { |
|
86 | 86 | return []; |
87 | 87 | } |
88 | 88 | |
89 | - return collect($matches)->mapWithKeys(function ($match) { |
|
89 | + return collect($matches)->mapWithKeys(function($match) { |
|
90 | 90 | $attribute = Str::camel($match['attribute']); |
91 | 91 | $value = $match['value'] ?? null; |
92 | 92 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function registeredComponents(): array |
65 | 65 | { |
66 | - return (new Collection($this->registeredComponents))->reverse()->unique(function (Component $component) { |
|
66 | + return (new Collection($this->registeredComponents))->reverse()->unique(function(Component $component) { |
|
67 | 67 | return $component->getTag(); |
68 | 68 | })->reverse()->values()->all(); |
69 | 69 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | return $this->registerViews( |
87 | 87 | ComponentCollection::make($componentDirectory->getFiles()) |
88 | - ->map(function (SplFileInfo $file) use ($componentDirectory) { |
|
88 | + ->map(function(SplFileInfo $file) use ($componentDirectory) { |
|
89 | 89 | return (View::createFromFile($file, $componentDirectory))->getName(); |
90 | 90 | }) |
91 | 91 | ); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | private function registerViews(iterable $views): ComponentCollection |
109 | 109 | { |
110 | - return ComponentCollection::make($views)->map(function (string $viewName) { |
|
110 | + return ComponentCollection::make($views)->map(function(string $viewName) { |
|
111 | 111 | return $this->component($viewName); |
112 | 112 | }); |
113 | 113 | } |