From e13f00169afb10f261f55afe3a6441aa4cee21f4 Mon Sep 17 00:00:00 2001 From: Stefan Csizmazia Date: Tue, 30 Sep 2025 09:16:41 +0200 Subject: [PATCH] add constants which cannot be inherited from symfony/console:^2.8 --- Kununu/CsFixer/Command/CsFixerCommand.php | 3 +++ Kununu/CsFixer/Command/CsFixerGitHookCommand.php | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Kununu/CsFixer/Command/CsFixerCommand.php b/Kununu/CsFixer/Command/CsFixerCommand.php index 96f869a..178788f 100644 --- a/Kununu/CsFixer/Command/CsFixerCommand.php +++ b/Kununu/CsFixer/Command/CsFixerCommand.php @@ -14,6 +14,9 @@ final class CsFixerCommand extends BaseCommand { + public const int SUCCESS = 0; + public const int FAILURE = 1; + private const string ARGUMENT_FILES = 'files'; private const string OPTION_CONFIG = 'config'; private const string OPTION_EXTRA_ARGS = 'extra-args'; diff --git a/Kununu/CsFixer/Command/CsFixerGitHookCommand.php b/Kununu/CsFixer/Command/CsFixerGitHookCommand.php index 8472f51..6d2b92c 100644 --- a/Kununu/CsFixer/Command/CsFixerGitHookCommand.php +++ b/Kununu/CsFixer/Command/CsFixerGitHookCommand.php @@ -13,6 +13,9 @@ final class CsFixerGitHookCommand extends BaseCommand { + public const int SUCCESS = 0; + public const int FAILURE = 1; + protected function configure(): void { $this @@ -42,11 +45,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int $io->success('PHP CS Fixer Git pre‑commit hook installed successfully.'); - return 0; + return self::SUCCESS; } catch (Throwable $e) { $io->error('Installation failed: ' . $e->getMessage()); - return 1; + return self::FAILURE; } }