diff --git a/composer.json b/composer.json index c26be1f..997dd0b 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,8 @@ "minimum-stability": "stable", "require": { "php": "^7.4 || ^8.0", - "symfony/console": "^6.0", - "jrosset/betterphptoken": "^1.0" + "jrosset/betterphptoken": "^1.0", + "symfony/console": "^6.0" }, "autoload": { "psr-4": { diff --git a/src/CliProgram/SafeApplication.php b/src/CliProgram/SafeApplication.php deleted file mode 100644 index b36537e..0000000 --- a/src/CliProgram/SafeApplication.php +++ /dev/null @@ -1,76 +0,0 @@ -processRuntimeException($exception, $input, $output); - } - } - - /** - * The exit code used when command failed with an exception - * - * @return int The exit code used when command failed with an exception - */ - public function getExceptionFailureExitCode (): int { - return $this->exceptionFailureExitCode; - } - /** - * Set the exit code used when command failed with an exception - * - * @param int $exceptionFailureExitCode The new exit code used when command failed with an exception - * - * @return $this - */ - public function setExceptionFailureExitCode (int $exceptionFailureExitCode): self { - $this->exceptionFailureExitCode = $exceptionFailureExitCode; - return $this; - } - /** - * Process runtime exception - * - * Default behavior: write exception message to $output (error) and return {@see SafeApplication::$exceptionFailureExitCode} - * - * @param Throwable $exception The exception - * @param InputInterface $input The input (i.e. argv) - * @param OutputInterface $output The output (i.e. STDOUT and STDERR) - * - * @return int The exit code - * - * @noinspection PhpUnusedParameterInspection - */ - protected function processRuntimeException (Throwable $exception, InputInterface $input, OutputInterface $output): int { - $output->writeln('' . $exception->getMessage() . ''); - return $this->exceptionFailureExitCode; - } -} \ No newline at end of file