@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | /** |
142 | 142 | * {@inheritDoc} |
143 | 143 | */ |
144 | - public function create() : Component|Includer |
|
144 | + public function create() : Component | Includer |
|
145 | 145 | { |
146 | 146 | if ($this->exists()) { |
147 | 147 | throw new DirectiveExistsException($this->name(), $this->theme()->package()); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | /** |
157 | 157 | * {@inheritDoc} |
158 | 158 | */ |
159 | - public function load() : Component|Includer |
|
159 | + public function load() : Component | Includer |
|
160 | 160 | { |
161 | 161 | $alias = $this->alias(); |
162 | 162 | $view = $this->getViewComponent(); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | private function loadViewComponent($alias, $view) : Directive |
183 | 183 | { |
184 | - Blade::component($alias, $view); |
|
184 | + Blade::component($alias, $view); |
|
185 | 185 | |
186 | 186 | return $this; |
187 | 187 | } |
@@ -193,9 +193,9 @@ discard block |
||
193 | 193 | |
194 | 194 | $classes = get_declared_classes(); |
195 | 195 | |
196 | - foreach($classes as $class) { |
|
196 | + foreach ($classes as $class) { |
|
197 | 197 | |
198 | - if (! $this->isViewComponent($class, $name)) { |
|
198 | + if (!$this->isViewComponent($class, $name)) { |
|
199 | 199 | continue; |
200 | 200 | } |
201 | 201 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | private function isViewComponent(string $class, string $name) : bool |
209 | 209 | { |
210 | - if (! is_subclass_of($class, ViewComponent::class)) { |
|
210 | + if (!is_subclass_of($class, ViewComponent::class)) { |
|
211 | 211 | return false; |
212 | 212 | } |
213 | 213 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | { |
228 | 228 | $path = $this->path(); |
229 | 229 | |
230 | - $base = $this->theme()->paths()->root() . DS; |
|
230 | + $base = $this->theme()->paths()->root().DS; |
|
231 | 231 | $base = FileSystem::folder($base)->sanitize(); |
232 | 232 | |
233 | 233 | return str_replace($base, '', $path); |
@@ -319,11 +319,11 @@ discard block |
||
319 | 319 | { |
320 | 320 | $parsed = $this->parser()->filename($sentence); |
321 | 321 | |
322 | - if (! $parsed) { |
|
322 | + if (!$parsed) { |
|
323 | 323 | throw new InvalidDirectiveNameException($sentence); |
324 | 324 | } |
325 | 325 | |
326 | - if (! $this->valid()->directive($parsed->name)) { |
|
326 | + if (!$this->valid()->directive($parsed->name)) { |
|
327 | 327 | throw new InvalidDirectiveNameException($sentence); |
328 | 328 | } |
329 | 329 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | */ |
341 | 341 | protected function setType(string $type) : Directive |
342 | 342 | { |
343 | - if (! $this->valid()->type($type)) { |
|
343 | + if (!$this->valid()->type($type)) { |
|
344 | 344 | throw new InvalidTypeDirectiveException($type); |
345 | 345 | } |
346 | 346 |
@@ -193,7 +193,7 @@ |
||
193 | 193 | |
194 | 194 | $classes = get_declared_classes(); |
195 | 195 | |
196 | - foreach($classes as $class) { |
|
196 | + foreach($classes as $class) { |
|
197 | 197 | |
198 | 198 | if (! $this->isViewComponent($class, $name)) { |
199 | 199 | continue; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | $directive = $this->getDirective($class); |
68 | 68 | |
69 | - if (! $directive) { |
|
69 | + if (!$directive) { |
|
70 | 70 | return $this; |
71 | 71 | } |
72 | 72 |
@@ -148,7 +148,7 @@ |
||
148 | 148 | * |
149 | 149 | * @return |
150 | 150 | */ |
151 | - public function render() |
|
151 | + public function render() |
|
152 | 152 | { |
153 | 153 | return view($this->view); |
154 | 154 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Maestriam\Samurai\Entities\Directive; |
6 | 6 | |
7 | 7 | class Component extends Directive |
8 | -{ |
|
8 | +{ |
|
9 | 9 | /** |
10 | 10 | * Tipo da diretiva |
11 | 11 | */ |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | $files = $this->readFiles(); |
31 | 31 | |
32 | - foreach($files as $file) { |
|
32 | + foreach ($files as $file) { |
|
33 | 33 | |
34 | 34 | $file = FileSystem::folder($file)->sanitize(); |
35 | 35 |