From 2b767fc0a0d696b284a3ff8509c5cf63a49a84af Mon Sep 17 00:00:00 2001 From: tswagger Date: Tue, 18 Mar 2025 17:02:01 -0500 Subject: [PATCH 1/3] Fixed SparkCommand.php to align with parent class return types. --- src/Commands/SparkCommand.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Commands/SparkCommand.php b/src/Commands/SparkCommand.php index 77032ec..48534a3 100644 --- a/src/Commands/SparkCommand.php +++ b/src/Commands/SparkCommand.php @@ -13,7 +13,7 @@ class SparkCommand extends Command { - protected function configure() + protected function configure(): int { $this ->setName('spark') @@ -37,8 +37,7 @@ protected function configure() ); } - protected function execute(InputInterface $input, OutputInterface $output) - { + protected function execute(InputInterface $input, OutputInterface $output): int { $bitLength = $input->getOption('bits'); $minBitLength = 4; From ce836181173193e9468374d3604b85c04e6c70a5 Mon Sep 17 00:00:00 2001 From: tswagger Date: Tue, 18 Mar 2025 17:02:01 -0500 Subject: [PATCH 2/3] Fixed SparkCommand.php to align with parent class return types. --- src/Commands/SparkCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/SparkCommand.php b/src/Commands/SparkCommand.php index 77032ec..fd7f54f 100644 --- a/src/Commands/SparkCommand.php +++ b/src/Commands/SparkCommand.php @@ -13,7 +13,7 @@ class SparkCommand extends Command { - protected function configure() + protected function configure(): int { $this ->setName('spark') @@ -37,8 +37,8 @@ protected function configure() ); } - protected function execute(InputInterface $input, OutputInterface $output) - { + protected function execute(InputInterface $input, OutputInterface $output): int + { $bitLength = $input->getOption('bits'); $minBitLength = 4; From 74097b123b638da3ece6f8e984c0b7e13e3580cc Mon Sep 17 00:00:00 2001 From: tswagger Date: Fri, 21 Mar 2025 12:43:57 -0500 Subject: [PATCH 3/3] Added missing return value --- src/Commands/SparkCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Commands/SparkCommand.php b/src/Commands/SparkCommand.php index fd7f54f..e784dd1 100644 --- a/src/Commands/SparkCommand.php +++ b/src/Commands/SparkCommand.php @@ -35,10 +35,12 @@ protected function configure(): int InputArgument::OPTIONAL, 'Your prime number' ); + + return 1; // method requires an integer return value } protected function execute(InputInterface $input, OutputInterface $output): int - { + { $bitLength = $input->getOption('bits'); $minBitLength = 4;