diff options
author | Joas Schilling <coding@schilljs.com> | 2024-10-02 23:58:31 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-10-21 11:28:53 +0200 |
commit | 91b9562bddf05c35c7f0f184341ec31df9045291 (patch) | |
tree | 57cf01b855bfd8c23bea8c4f2a1ab4cf3a1f7e3b | |
parent | d1d30e0be70b1d403f0e6161f4b61c73710cd7f7 (diff) | |
download | nextcloud-server-91b9562bddf05c35c7f0f184341ec31df9045291.tar.gz nextcloud-server-91b9562bddf05c35c7f0f184341ec31df9045291.zip |
ci: Fix psalm by typing the QuestionHelper
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | apps/files_external/lib/Command/Delete.php | 2 | ||||
-rw-r--r-- | core/Command/Background/Delete.php | 2 | ||||
-rw-r--r-- | core/Command/Config/App/SetConfig.php | 2 | ||||
-rw-r--r-- | core/Command/Db/ConvertFilecacheBigInt.php | 2 | ||||
-rw-r--r-- | core/Command/Db/Migrations/GenerateCommand.php | 2 | ||||
-rw-r--r-- | core/Command/Maintenance/RepairShareOwnership.php | 2 | ||||
-rw-r--r-- | core/Command/Preview/Repair.php | 2 |
7 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index 077b969d7b2..b432587e603 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -12,6 +12,7 @@ use OCA\Files_External\Service\GlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\IUserManager; use OCP\IUserSession; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -64,6 +65,7 @@ class Delete extends Base { $listInput->setOption('output', $input->getOption('output')); $listCommand->listMounts(null, [$mount], $listInput, $output); + /** @var QuestionHelper $questionHelper */ $questionHelper = $this->getHelper('question'); $question = new ConfirmationQuestion('Delete this mount? [y/N] ', false); diff --git a/core/Command/Background/Delete.php b/core/Command/Background/Delete.php index 45148d2d414..90a71fcbadd 100644 --- a/core/Command/Background/Delete.php +++ b/core/Command/Background/Delete.php @@ -10,6 +10,7 @@ namespace OC\Core\Command\Background; use OC\Core\Command\Base; use OCP\BackgroundJob\IJobList; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -51,6 +52,7 @@ class Delete extends Base { '/^(y|Y)/i' ); + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); if (!$helper->ask($input, $output, $question)) { $output->writeln('aborted.'); diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php index f898271a6c1..0484c2da846 100644 --- a/core/Command/Config/App/SetConfig.php +++ b/core/Command/Config/App/SetConfig.php @@ -12,6 +12,7 @@ use OC\AppConfig; use OCP\Exceptions\AppConfigIncorrectTypeException; use OCP\Exceptions\AppConfigUnknownKeyException; use OCP\IAppConfig; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -229,6 +230,7 @@ class SetConfig extends Base { } private function ask(InputInterface $input, OutputInterface $output, string $request): bool { + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); if ($input->getOption('no-interaction')) { return true; diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index d16e6d30231..f5028aacaef 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -11,6 +11,7 @@ use OC\DB\SchemaWrapper; use OCP\DB\Types; use OCP\IDBConnection; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ConfirmationQuestion; @@ -89,6 +90,7 @@ class ConvertFilecacheBigInt extends Command { $output->writeln('<comment>This can take up to hours, depending on the number of files in your instance!</comment>'); if ($input->isInteractive()) { + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', false); diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php index 1d30d8d08cc..186a45c36fb 100644 --- a/core/Command/Db/Migrations/GenerateCommand.php +++ b/core/Command/Db/Migrations/GenerateCommand.php @@ -15,6 +15,7 @@ use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareI use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -120,6 +121,7 @@ class {{classname}} extends SimpleMigrationStep { $output->writeln('<comment> - Actual: ' . $version . '</comment>'); if ($input->isInteractive()) { + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('Continue with your given version? (y/n) [n] ', false); diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php index 842ee769e8c..6ae235ab3e9 100644 --- a/core/Command/Maintenance/RepairShareOwnership.php +++ b/core/Command/Maintenance/RepairShareOwnership.php @@ -14,6 +14,7 @@ use OCP\IDBConnection; use OCP\IUser; use OCP\IUserManager; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -60,6 +61,7 @@ class RepairShareOwnership extends Command { $output->writeln(""); if (!$noConfirm) { + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('Repair these shares? [y/N]', false); diff --git a/core/Command/Preview/Repair.php b/core/Command/Preview/Repair.php index 2b24e993b4f..a6564209163 100644 --- a/core/Command/Preview/Repair.php +++ b/core/Command/Preview/Repair.php @@ -19,6 +19,7 @@ use OCP\Lock\LockedException; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -133,6 +134,7 @@ class Repair extends Command { if ($input->getOption('batch')) { $output->writeln('Batch mode active: migration is started right away.'); } else { + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('<info>Should the migration be started? (y/[n]) </info>', false); |