Skip to content

Commit

Permalink
Merge pull request #1173 from owncloud/symfony-command-execute-int
Browse files Browse the repository at this point in the history
Always return an int from Symfony Command execute method
  • Loading branch information
phil-davis authored May 18, 2023
2 parents 40209c4 + d4dbb80 commit 29d548d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Command/SendEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ protected function configure() {
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|void
* @return int
*/
public function execute(InputInterface $input, OutputInterface $output) {
$verbocity = $output->getVerbosity();
if ($verbocity >= OutputInterface::VERBOSITY_VERBOSE) {
public function execute(InputInterface $input, OutputInterface $output): int {
$verbosity = $output->getVerbosity();
if ($verbosity >= OutputInterface::VERBOSITY_VERBOSE) {
$progress = new ProgressBar($output);
$progress->start();
} else {
Expand All @@ -95,6 +95,7 @@ public function execute(InputInterface $input, OutputInterface $output) {
if ($progress !== null) {
$progress->finish();
}
return 0;
}

/**
Expand Down

0 comments on commit 29d548d

Please sign in to comment.