aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Config/App/DeleteConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Config/App/DeleteConfig.php')
-rw-r--r--core/Command/Config/App/DeleteConfig.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/core/Command/Config/App/DeleteConfig.php b/core/Command/Config/App/DeleteConfig.php
index 2e34197e541..5a08ecbdc42 100644
--- a/core/Command/Config/App/DeleteConfig.php
+++ b/core/Command/Config/App/DeleteConfig.php
@@ -1,5 +1,6 @@
<?php
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -7,19 +8,12 @@
*/
namespace OC\Core\Command\Config\App;
-use OCP\IConfig;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class DeleteConfig extends Base {
- public function __construct(
- protected IConfig $config,
- ) {
- parent::__construct();
- }
-
protected function configure() {
parent::configure();
@@ -49,12 +43,12 @@ class DeleteConfig extends Base {
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');
- if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->config->getAppKeys($appName))) {
+ if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->appConfig->getKeys($appName), true)) {
$output->writeln('<error>Config ' . $configName . ' of app ' . $appName . ' could not be deleted because it did not exist</error>');
return 1;
}
- $this->config->deleteAppValue($appName, $configName);
+ $this->appConfig->deleteKey($appName, $configName);
$output->writeln('<info>Config value ' . $configName . ' of app ' . $appName . ' deleted</info>');
return 0;
}