Skip to content

Commit

Permalink
Remove usage of constant for better consistency across the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 5, 2023
1 parent 90f21e2 commit 9a16a1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Command/CompleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
throw $e;
}

return self::FAILURE;
return 2;
}

return self::SUCCESS;
return 0;
}

private function createCompletionInput(InputInterface $input): CompletionInput
Expand Down
6 changes: 3 additions & 3 deletions Command/DumpCompletionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($input->getOption('debug')) {
$this->tailDebugLog($commandName, $output);

return self::SUCCESS;
return 0;
}

$shell = $input->getArgument('shell') ?? self::guessShell();
Expand All @@ -102,12 +102,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln(sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', implode('", "', $supportedShells)));
}

return self::INVALID;
return 2;
}

$output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], file_get_contents($completionFile)));

return self::SUCCESS;
return 0;
}

private static function guessShell(): string
Expand Down

0 comments on commit 9a16a1c

Please sign in to comment.