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
7 changes: 4 additions & 3 deletions src/Command/CompileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Civi\CompilePlugin\TaskRunner;
use Civi\CompilePlugin\Util\EnvHelper;
use Composer\Script\ScriptEvents;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -37,7 +38,7 @@ protected function configure()
protected function initialize(
InputInterface $input,
OutputInterface $output
) {
): void {
$so = $input->getOption('soft-options');
if ($so) {
$json = json_decode(base64_decode($so), 1);
Expand All @@ -51,7 +52,7 @@ protected function initialize(
parent::initialize($input, $output);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if ($output->isVerbose()) {
EnvHelper::set('COMPOSER_COMPILE_PASSTHRU', 'always');
Expand All @@ -75,6 +76,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$taskRunner->runDefault($taskList, $input->getOption('dry-run'));
}
return 0;
return Command::SUCCESS;
}
}
5 changes: 3 additions & 2 deletions src/Command/CompileListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Civi\CompilePlugin\TaskList;
use Civi\CompilePlugin\TaskRunner;
use Civi\CompilePlugin\Util\TaskUIHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -23,7 +24,7 @@ protected function configure()
;
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$taskList = new TaskList($this->getComposer(), $this->getIO());
$taskList->load();
Expand All @@ -42,6 +43,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->write(TaskUIHelper::formatTaskTable($tasks, ['active', 'id', 'title', 'action']));
}
return 0;
return Command::SUCCESS;
}
}
5 changes: 3 additions & 2 deletions src/Command/CompileWatchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Civi\CompilePlugin\Util\ShellRunner;
use Composer\EventDispatcher\ScriptExecutionException;
use Lurker\ResourceWatcher;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -27,7 +28,7 @@ protected function configure()
;
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if ($output->isVerbose()) {
EnvHelper::set('COMPOSER_COMPILE_PASSTHRU', 'always');
Expand Down Expand Up @@ -110,7 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln("Polling", OutputInterface::VERBOSITY_VERY_VERBOSE);
$watcher->start($intervalMicroseconds, $intervalMicroseconds);
}
return 0;
return Command::SUCCESS;
}

/**
Expand Down