aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Config/App/Base.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Config/App/Base.php')
-rw-r--r--core/Command/Config/App/Base.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/Command/Config/App/Base.php b/core/Command/Config/App/Base.php
index 7d3e9a83193..07341c4faf9 100644
--- a/core/Command/Config/App/Base.php
+++ b/core/Command/Config/App/Base.php
@@ -1,15 +1,21 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Core\Command\Config\App;
-use OCP\IConfig;
+use OCP\IAppConfig;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
abstract class Base extends \OC\Core\Command\Base {
- protected IConfig $config;
+ public function __construct(
+ protected IAppConfig $appConfig,
+ ) {
+ parent::__construct();
+ }
/**
* @param string $argumentName
@@ -18,12 +24,12 @@ abstract class Base extends \OC\Core\Command\Base {
*/
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
- return \OC_App::getAllApps();
+ return $this->appConfig->getApps();
}
if ($argumentName === 'name') {
$appName = $context->getWordAtIndex($context->getWordIndex() - 1);
- return $this->config->getAppKeys($appName);
+ return $this->appConfig->getKeys($appName);
}
return [];
}