diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-05-23 20:56:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 20:56:18 +0200 |
commit | 0fca8238dd86d572f0f15eaa8e8a5ea836cc76bf (patch) | |
tree | ad55655bc4c933c904f67c0af58606514d0416a7 /core/Command | |
parent | 7ec1ceb79afaf4211aabe77e5a0c7ec5fb41542c (diff) | |
parent | 8f4b20aaa172a262482d3884067d0fc8fb116064 (diff) | |
download | nextcloud-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.php | 22 |
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; } } |