From bf23fbb7bb0bc854256486d7cace491331bd1bb5 Mon Sep 17 00:00:00 2001 From: yemkareems Date: Thu, 20 Nov 2025 11:32:35 +0530 Subject: [PATCH] fix: removed the runEncryption Method as it is not required Signed-off-by: yemkareems --- core/Command/Encryption/EncryptAll.php | 28 +++++++++++--------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php index 99c9fe1658b..d453d575d1a 100644 --- a/core/Command/Encryption/EncryptAll.php +++ b/core/Command/Encryption/EncryptAll.php @@ -90,25 +90,21 @@ class EncryptAll extends Command { $question = new ConfirmationQuestion('Do you really want to continue? (y/n) ', true); if ($this->questionHelper->ask($input, $output, $question)) { //run encryption with the answer yes in interactive mode - return $this->runEncryption($input, $output); - } - //abort on no in interactive mode - $output->writeln('aborted'); - return self::FAILURE; - } + $this->forceMaintenanceAndTrashbin(); - private function runEncryption(InputInterface $input, OutputInterface $output): int { - $this->forceMaintenanceAndTrashbin(); + try { + $defaultModule = $this->encryptionManager->getEncryptionModule(); + $defaultModule->encryptAll($input, $output); + } catch (\Exception $ex) { + $this->resetMaintenanceAndTrashbin(); + throw $ex; + } - try { - $defaultModule = $this->encryptionManager->getEncryptionModule(); - $defaultModule->encryptAll($input, $output); - } catch (\Exception $ex) { $this->resetMaintenanceAndTrashbin(); - throw $ex; + return self::SUCCESS; } - - $this->resetMaintenanceAndTrashbin(); - return self::SUCCESS; + //abort on no in interactive mode + $output->writeln('aborted'); + return self::FAILURE; } }