From c6d8f1cc5173b68d358d4756332584eaeb5719c1 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 18 May 2023 15:13:53 +0545 Subject: [PATCH] Always return an int from Symfony Command execute method --- lib/Command/Generate.php | 4 +++- lib/Command/RepairNotifications.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Command/Generate.php b/lib/Command/Generate.php index 34a001d2..723a3ea7 100644 --- a/lib/Command/Generate.php +++ b/lib/Command/Generate.php @@ -66,8 +66,10 @@ protected function configure() { /** * @param InputInterface $input * @param OutputInterface $output + * @return int + * @throws \Exception */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $user = $input->getOption('user'); $group = $input->getOption('group'); if ($user === null && $group === null) { diff --git a/lib/Command/RepairNotifications.php b/lib/Command/RepairNotifications.php index db9092cb..20e91b7d 100644 --- a/lib/Command/RepairNotifications.php +++ b/lib/Command/RepairNotifications.php @@ -58,7 +58,7 @@ protected function configure() { * @param OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $subject = $input->getArgument('subject'); if (!\in_array($subject, self::$availableSubjects)) {