diff options
Diffstat (limited to 'core/Command/Encryption/ListModules.php')
-rw-r--r-- | core/Command/Encryption/ListModules.php | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php index 88ad9875073..bf02c29f432 100644 --- a/core/Command/Encryption/ListModules.php +++ b/core/Command/Encryption/ListModules.php @@ -1,25 +1,9 @@ <?php + /** - * @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> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OC\Core\Command\Encryption; @@ -30,16 +14,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class ListModules extends Base { - protected IManager $encryptionManager; - protected IConfig $config; - public function __construct( - IManager $encryptionManager, - IConfig $config + protected IManager $encryptionManager, + protected IConfig $config, ) { parent::__construct(); - $this->encryptionManager = $encryptionManager; - $this->config = $config; } protected function configure() { @@ -54,8 +33,8 @@ class ListModules extends Base { 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."); + $output->writeln('Maintenance mode must be disabled when listing modules'); + $output->writeln('in order to list the relevant encryption modules correctly.'); return 1; } @@ -78,7 +57,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): void { if (!$item['default']) { $item = $item['displayName']; } else { |