Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Kununu/CsFixer/Command/CsFixerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
7 changes: 5 additions & 2 deletions Kununu/CsFixer/Command/CsFixerGitHookCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

final class CsFixerGitHookCommand extends BaseCommand
{
public const int SUCCESS = 0;
public const int FAILURE = 1;

protected function configure(): void
{
$this
Expand Down Expand Up @@ -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;
}
}

Expand Down