From 7ee52c68ed3dcd943926d87011c37c0cfa60c131 Mon Sep 17 00:00:00 2001 From: Josh Cirre Date: Thu, 30 May 2024 09:28:31 -0700 Subject: [PATCH] change nested ternary to if statement --- src/Console/MakeCommand.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Console/MakeCommand.php b/src/Console/MakeCommand.php index d26882e..4dbd7db 100644 --- a/src/Console/MakeCommand.php +++ b/src/Console/MakeCommand.php @@ -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