Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Encryption/ListModules.php')
-rw-r--r--core/Command/Encryption/ListModules.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php
index dd9290eea81..9105dff3f6d 100644
--- a/core/Command/Encryption/ListModules.php
+++ b/core/Command/Encryption/ListModules.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Joas Schilling <coding@schilljs.com>
* @author Ruben Homs <ruben@homs.codes>
*
@@ -20,7 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
namespace OC\Core\Command\Encryption;
use OC\Core\Command\Base;
@@ -58,12 +58,12 @@ class ListModules extends Base {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
if ($isMaintenanceModeEnabled) {
$output->writeln("Maintenance mode must be disabled when listing modules");
$output->writeln("in order to list the relevant encryption modules correctly.");
- return;
+ return 1;
}
$encryptionModules = $this->encryptionManager->getEncryptionModules();
@@ -75,6 +75,7 @@ class ListModules extends Base {
$encModules[$module['id']]['default'] = $module['id'] === $defaultEncryptionModuleId;
}
$this->writeModuleList($input, $output, $encModules);
+ return 0;
}
/**
@@ -84,7 +85,7 @@ class ListModules extends Base {
*/
protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) {
if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) {
- array_walk($items, function(&$item) {
+ array_walk($items, function (&$item) {
if (!$item['default']) {
$item = $item['displayName'];
} else {