diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-22 15:58:50 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-25 16:13:46 +0200 |
commit | 4f260dce6e43ddef835105a1d4dc13f2b8742526 (patch) | |
tree | e69cf7ca3be76975519dba86179fc39609efe7f8 /core/Command | |
parent | 4ba30d40cfc892bee0ea28486e63c479e1aadd20 (diff) | |
download | nextcloud-server-4f260dce6e43ddef835105a1d4dc13f2b8742526.tar.gz nextcloud-server-4f260dce6e43ddef835105a1d4dc13f2b8742526.zip |
Moving to string key for arguments of GenericEvent in Repair
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Maintenance/Repair.php | 12 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index 2c1fda7c8e4..6dac3085ca8 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -122,26 +122,26 @@ class Repair extends Command { } switch ($event->getSubject()) { case '\OC\Repair::startProgress': - $this->progress->start($event->getArgument(0)); + $this->progress->start($event->getArgument('max')); break; case '\OC\Repair::advance': - $this->progress->advance($event->getArgument(0)); + $this->progress->advance($event->getArgument('step')); break; case '\OC\Repair::finishProgress': $this->progress->finish(); $this->output->writeln(''); break; case '\OC\Repair::step': - $this->output->writeln(' - ' . $event->getArgument(0)); + $this->output->writeln(' - ' . $event->getArgument('step')); break; case '\OC\Repair::info': - $this->output->writeln(' - ' . $event->getArgument(0)); + $this->output->writeln(' - ' . $event->getArgument('message')); break; case '\OC\Repair::warning': - $this->output->writeln(' - WARNING: ' . $event->getArgument(0)); + $this->output->writeln(' - WARNING: ' . $event->getArgument('message')); break; case '\OC\Repair::error': - $this->output->writeln('<error> - ERROR: ' . $event->getArgument(0) . '</error>'); + $this->output->writeln('<error> - ERROR: ' . $event->getArgument('message') . '</error>'); break; } } diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 69a7f1f656f..f848ab21ea6 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -125,16 +125,16 @@ class Upgrade extends Command { switch ($event->getSubject()) { case '\OC\Repair::startProgress': $progress->setMessage('Starting ...'); - $output->writeln($event->getArgument(1)); + $output->writeln($event->getArgument('step')); $output->writeln(''); - $progress->start($event->getArgument(0)); + $progress->start($event->getArgument('max')); break; case '\OC\Repair::advance': - $desc = $event->getArgument(1); + $desc = $event->getArgument('desc'); if (!empty($desc)) { $progress->setMessage($desc); } - $progress->advance($event->getArgument(0)); + $progress->advance($event->getArgument('step')); break; case '\OC\Repair::finishProgress': @@ -144,19 +144,19 @@ class Upgrade extends Command { break; case '\OC\Repair::step': if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { - $output->writeln('<info>Repair step: ' . $event->getArgument(0) . '</info>'); + $output->writeln('<info>Repair step: ' . $event->getArgument('step') . '</info>'); } break; case '\OC\Repair::info': if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { - $output->writeln('<info>Repair info: ' . $event->getArgument(0) . '</info>'); + $output->writeln('<info>Repair info: ' . $event->getArgument('message') . '</info>'); } break; case '\OC\Repair::warning': - $output->writeln('<error>Repair warning: ' . $event->getArgument(0) . '</error>'); + $output->writeln('<error>Repair warning: ' . $event->getArgument('message') . '</error>'); break; case '\OC\Repair::error': - $output->writeln('<error>Repair error: ' . $event->getArgument(0) . '</error>'); + $output->writeln('<error>Repair error: ' . $event->getArgument('message') . '</error>'); break; } }; |