diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php index c5abc6c95cf01..53a1376534249 100644 --- a/core/Command/App/Disable.php +++ b/core/Command/App/Disable.php @@ -83,7 +83,7 @@ private function disableApp(string $appId, OutputInterface $output): void { * @param CompletionContext $context * @return string[] */ - public function completeOptionValues($optionName, CompletionContext $context) { + public function completeOptionValues($optionName, CompletionContext $context): array { return []; } @@ -92,7 +92,7 @@ public function completeOptionValues($optionName, CompletionContext $context) { * @param CompletionContext $context * @return string[] */ - public function completeArgumentValues($argumentName, CompletionContext $context) { + public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { return array_diff(\OC_App::getEnabledApps(true, true), $this->appManager->getAlwaysEnabledApps()); } diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index c3ab8be38cea4..624b31521ad74 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -146,7 +146,7 @@ private function resolveGroupIds(array $groupIds): array { * @param CompletionContext $context * @return string[] */ - public function completeOptionValues($optionName, CompletionContext $context) { + public function completeOptionValues($optionName, CompletionContext $context): array { if ($optionName === 'groups') { return array_map(function (IGroup $group) { return $group->getGID(); @@ -160,7 +160,7 @@ public function completeOptionValues($optionName, CompletionContext $context) { * @param CompletionContext $context * @return string[] */ - public function completeArgumentValues($argumentName, CompletionContext $context) { + public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { $allApps = \OC_App::getAllApps(); return array_diff($allApps, \OC_App::getEnabledApps(true, true)); diff --git a/core/Command/App/GetPath.php b/core/Command/App/GetPath.php index 2ec723851912a..ea614070e7d0d 100644 --- a/core/Command/App/GetPath.php +++ b/core/Command/App/GetPath.php @@ -29,7 +29,7 @@ use Symfony\Component\Console\Output\OutputInterface; class GetPath extends Base { - protected function configure() { + protected function configure(): void { parent::configure(); $this @@ -67,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * @param CompletionContext $context * @return string[] */ - public function completeArgumentValues($argumentName, CompletionContext $context) { + public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app') { return \OC_App::getAllApps(); } diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index d87439b366480..2d02fff4dbfd8 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -36,7 +36,7 @@ use Symfony\Component\Console\Output\OutputInterface; class Install extends Command { - protected function configure() { + protected function configure(): void { $this ->setName('app:install') ->setDescription('install an app') diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php index 24856304afc39..2db781418e591 100644 --- a/core/Command/App/ListApps.php +++ b/core/Command/App/ListApps.php @@ -39,7 +39,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { parent::configure(); $this @@ -98,7 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * @param OutputInterface $output * @param array $items */ - protected function writeAppList(InputInterface $input, OutputInterface $output, $items) { + protected function writeAppList(InputInterface $input, OutputInterface $output, $items): void { switch ($input->getOption('output')) { case self::OUTPUT_FORMAT_PLAIN: $output->writeln('Enabled:'); @@ -119,7 +119,7 @@ protected function writeAppList(InputInterface $input, OutputInterface $output, * @param CompletionContext $context * @return array */ - public function completeOptionValues($optionName, CompletionContext $context) { + public function completeOptionValues($optionName, CompletionContext $context): array { if ($optionName === 'shipped') { return ['true', 'false']; } @@ -131,7 +131,7 @@ public function completeOptionValues($optionName, CompletionContext $context) { * @param CompletionContext $context * @return string[] */ - public function completeArgumentValues($argumentName, CompletionContext $context) { + public function completeArgumentValues($argumentName, CompletionContext $context): array { return []; } } diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index 522ddc20e07c0..5fa05079bd824 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -47,7 +47,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { $this ->setName('app:remove') ->setDescription('remove an app') @@ -124,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * @param CompletionContext $context * @return string[] */ - public function completeOptionValues($optionName, CompletionContext $context) { + public function completeOptionValues($optionName, CompletionContext $context): array { return []; } @@ -133,7 +133,7 @@ public function completeOptionValues($optionName, CompletionContext $context) { * @param CompletionContext $context * @return string[] */ - public function completeArgumentValues($argumentName, CompletionContext $context) { + public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { return \OC_App::getAllApps(); } diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php index 7d47034398fdb..c089416744f49 100644 --- a/core/Command/App/Update.php +++ b/core/Command/App/Update.php @@ -45,7 +45,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { $this ->setName('app:update') ->setDescription('update an app or all apps')