Skip to content

Commit 7c3ba0e

Browse files
committed
formatting
1 parent 4ab37bb commit 7c3ba0e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Illuminate/View/Compilers/BladeCompiler.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function check($name, ...$parameters)
425425
}
426426

427427
/**
428-
* Register a component alias.
428+
* Register a component alias directive.
429429
*
430430
* @param string $path
431431
* @param string $alias
@@ -436,11 +436,9 @@ public function component($path, $alias = null)
436436
$alias = $alias ?: array_last(explode('.', $path));
437437

438438
$this->directive($alias, function ($expression) use ($path) {
439-
if ($expression) {
440-
return "<?php \$__env->startComponent('{$path}', {$expression}); ?>";
441-
} else {
442-
return "<?php \$__env->startComponent('{$path}'); ?>";
443-
}
439+
return $expression
440+
? "<?php \$__env->startComponent('{$path}', {$expression}); ?>"
441+
: "<?php \$__env->startComponent('{$path}'); ?>";
444442
});
445443

446444
$this->directive('end'.$alias, function ($expression) use ($path) {

0 commit comments

Comments
 (0)