Skip to content

Commit

Permalink
change nested ternary to if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Cirre authored and Josh Cirre committed May 30, 2024
1 parent 6ec281d commit 7ee52c6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Console/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ protected function getPath($name): string
*/
protected function getStub(): string
{
$stubName = $this->option('class')
? 'volt-component-class.stub'
: ($this->option('functional')
? 'volt-component.stub'
: ($this->usingClass()
? 'volt-component-class.stub'
: 'volt-component.stub'
));
if ($this->option('class')) {
$stubName = 'volt-component-class.stub';
} elseif ($this->option('functional')) {
$stubName = 'volt-component.stub';
} elseif ($this->usingClass()) {
$stubName = 'volt-component-class.stub';
} else {
$stubName = 'volt-component.stub';
}

return file_exists($customPath = $this->laravel->basePath('stubs/'.$stubName))
? $customPath
Expand Down

0 comments on commit 7ee52c6

Please sign in to comment.