Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 15, 2018
1 parent 4ab37bb commit 7c3ba0e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Illuminate/View/Compilers/BladeCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function check($name, ...$parameters)
}

/**
* Register a component alias.
* Register a component alias directive.
*
* @param string $path
* @param string $alias
Expand All @@ -436,11 +436,9 @@ public function component($path, $alias = null)
$alias = $alias ?: array_last(explode('.', $path));

$this->directive($alias, function ($expression) use ($path) {
if ($expression) {
return "<?php \$__env->startComponent('{$path}', {$expression}); ?>";
} else {
return "<?php \$__env->startComponent('{$path}'); ?>";
}
return $expression
? "<?php \$__env->startComponent('{$path}', {$expression}); ?>"
: "<?php \$__env->startComponent('{$path}'); ?>";
});

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

0 comments on commit 7c3ba0e

Please sign in to comment.