fix: removed the runEncryption Method as it is not required

Signed-off-by: yemkareems <yemkareems@gmail.com>
pull/56419/head
yemkareems 2025-11-20 11:32:35 +07:00
parent 26e2ff9dca
commit bf23fbb7bb
No known key found for this signature in database
GPG Key ID: 4293DA00B9478934
1 changed files with 12 additions and 16 deletions

@ -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;
}
}