summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-05-23 20:56:18 +0200
committerGitHub <noreply@github.com>2023-05-23 20:56:18 +0200
commit0fca8238dd86d572f0f15eaa8e8a5ea836cc76bf (patch)
treead55655bc4c933c904f67c0af58606514d0416a7 /core/Command
parent7ec1ceb79afaf4211aabe77e5a0c7ec5fb41542c (diff)
parent8f4b20aaa172a262482d3884067d0fc8fb116064 (diff)
downloadnextcloud-server-0fca8238dd86d572f0f15eaa8e8a5ea836cc76bf.tar.gz
nextcloud-server-0fca8238dd86d572f0f15eaa8e8a5ea836cc76bf.zip
Merge pull request #37665 from fsamapoor/patch-2
Refactors Command/Encryption/Enable.php to improve code readability.
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Encryption/Enable.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/Command/Encryption/Enable.php b/core/Command/Encryption/Enable.php
index 9d680144e60..284d96809ae 100644
--- a/core/Command/Encryption/Enable.php
+++ b/core/Command/Encryption/Enable.php
@@ -59,18 +59,18 @@ class Enable extends Command {
if (empty($modules)) {
$output->writeln('<error>No encryption module is loaded</error>');
return 1;
- } else {
- $defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
- if ($defaultModule === null) {
- $output->writeln('<error>No default module is set</error>');
- return 1;
- } elseif (!isset($modules[$defaultModule])) {
- $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
- return 1;
- } else {
- $output->writeln('Default module: ' . $defaultModule);
- }
}
+ $defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
+ if ($defaultModule === null) {
+ $output->writeln('<error>No default module is set</error>');
+ return 1;
+ }
+ if (!isset($modules[$defaultModule])) {
+ $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
+ return 1;
+ }
+ $output->writeln('Default module: ' . $defaultModule);
+
return 0;
}
}