Skip to content

Commit

Permalink
Merge pull request #5 from spryker-sdk/bugfix/check-parameters-if-the…
Browse files Browse the repository at this point in the history
…y-empty

Fixed bug with empty parameters
  • Loading branch information
dereuromark authored Jan 26, 2022
2 parents 37e66bd + 065fcec commit 5603622
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/SecurityChecker/Command/SecurityCheckerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ protected function configure(): void
'f',
InputOption::VALUE_OPTIONAL,
'Set format for checker',
false,
)
->addOption(
static::OPTION_PATH,
'p',
InputOption::VALUE_OPTIONAL,
'Set path for checker',
false,
);
}

Expand Down Expand Up @@ -83,11 +81,11 @@ protected function getParameters(InputInterface $input): array
{
$parameters = [];

if ($input->hasOption(static::OPTION_PATH)) {
if ($input->getOption(static::OPTION_PATH)) {
$parameters[] = sprintf('--%s=%s', static::OPTION_PATH, $input->getOption(static::OPTION_PATH));
}

if ($input->hasOption(static::OPTION_FORMAT)) {
if ($input->getOption(static::OPTION_FORMAT)) {
$parameters[] = sprintf('--%s=%s', static::OPTION_FORMAT, $input->getOption(static::OPTION_FORMAT));
}

Expand Down

0 comments on commit 5603622

Please sign in to comment.