From d4dbb805128dc7ce67998ecc67691beabd346f45 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 18 May 2023 15:00:33 +0545 Subject: [PATCH] Always return an int from Symfony Command execute method --- lib/Command/SendEmails.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Command/SendEmails.php b/lib/Command/SendEmails.php index a2f2a2e7..6aacc1f1 100644 --- a/lib/Command/SendEmails.php +++ b/lib/Command/SendEmails.php @@ -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 { @@ -95,6 +95,7 @@ public function execute(InputInterface $input, OutputInterface $output) { if ($progress !== null) { $progress->finish(); } + return 0; } /**