diff options
-rw-r--r-- | core/Command/Upgrade.php | 4 | ||||
-rw-r--r-- | core/ajax/update.php | 9 | ||||
-rw-r--r-- | lib/private/Updater.php | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index f8a68c5697c..05f0615d33b 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -105,7 +105,7 @@ class Upgrade extends Command { $dispatcher = \OC::$server->get(IEventDispatcher::class); $progress = new ProgressBar($output); $progress->setFormat(" %message%\n %current%/%max% [%bar%] %percent:3s%%"); - $listener = function (MigratorExecuteSqlEvent $event) use ($progress, $output) { + $listener = function (MigratorExecuteSqlEvent $event) use ($progress, $output): void { $message = $event->getSql(); if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { $output->writeln(' Executing SQL ' . $message); @@ -126,7 +126,7 @@ class Upgrade extends Command { } } }; - $repairListener = function (Event $event) use ($progress, $output) { + $repairListener = function (Event $event) use ($progress, $output): void { if ($event instanceof RepairStartEvent) { $progress->setMessage('Starting ...'); $output->writeln($event->getCurrentStepName()); diff --git a/core/ajax/update.php b/core/ajax/update.php index 105cedd05f2..acd8c3b22c0 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -121,9 +121,12 @@ if (\OCP\Util::needUpgrade()) { /** @var IEventDispatcher $dispatcher */ $dispatcher = \OC::$server->get(IEventDispatcher::class); - $dispatcher->addListener(MigratorExecuteSqlEvent::class, function (MigratorExecuteSqlEvent $event) use ($eventSource, $l) { - $eventSource->send('success', $l->t('[%d / %d]: %s', [$event->getCurrentStep(), $event->getMaxStep(), $event->getSql()])); - }); + $dispatcher->addListener( + MigratorExecuteSqlEvent::class, + function (MigratorExecuteSqlEvent $event) use ($eventSource, $l): void { + $eventSource->send('success', $l->t('[%d / %d]: %s', [$event->getCurrentStep(), $event->getMaxStep(), $event->getSql()])); + } + ); $feedBack = new FeedBackHandler($eventSource, $l); $dispatcher->addListener(RepairStartEvent::class, [$feedBack, 'handleRepairFeedback']); $dispatcher->addListener(RepairAdvanceEvent::class, [$feedBack, 'handleRepairFeedback']); diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 889b54eec51..49909fc4562 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -447,12 +447,12 @@ class Updater extends BasicEmitter { $dispatcher = \OC::$server->get(IEventDispatcher::class); $dispatcher->addListener( MigratorExecuteSqlEvent::class, - function (MigratorExecuteSqlEvent $event) use ($log) { + function (MigratorExecuteSqlEvent $event) use ($log): void { $log->info(get_class($event).': ' . $event->getSql() . ' (' . $event->getCurrentStep() . ' of ' . $event->getMaxStep() . ')', ['app' => 'updater']); } ); - $repairListener = function (Event $event) use ($log) { + $repairListener = function (Event $event) use ($log): void { if ($event instanceof RepairStartEvent) { $log->info(get_class($event).': Starting ... ' . $event->getMaxStep() . ' (' . $event->getCurrentStepName() . ')', ['app' => 'updater']); } elseif ($event instanceof RepairAdvanceEvent) { |