summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-02-14 19:51:39 +0100
committerGitHub <noreply@github.com>2019-02-14 19:51:39 +0100
commitb6d327ee47b2c4cbd062d52997efbe0186c4c45c (patch)
tree02d3a9e20f80dc8c76fd9b53ca5c6d8cf6cdc399 /lib/private
parentaf233f841f13c69ad20046c775bbc6d1b3b6e320 (diff)
parente090973e64d34bfb20062acce67512b30dcfb489 (diff)
downloadnextcloud-server-b6d327ee47b2c4cbd062d52997efbe0186c4c45c.tar.gz
nextcloud-server-b6d327ee47b2c4cbd062d52997efbe0186c4c45c.zip
Merge pull request #13995 from nextcloud/feature/dont-call-get-repair-steps
Do not run getRepairSteps in register_commands
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Migration/BackgroundRepair.php10
-rw-r--r--lib/private/Repair.php8
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/private/Migration/BackgroundRepair.php b/lib/private/Migration/BackgroundRepair.php
index 62ba3a9554c..a873d23e7b2 100644
--- a/lib/private/Migration/BackgroundRepair.php
+++ b/lib/private/Migration/BackgroundRepair.php
@@ -29,7 +29,7 @@ use OC\Repair;
use OC_App;
use OCP\BackgroundJob\IJobList;
use OCP\ILogger;
-use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class BackgroundRepair
@@ -44,12 +44,16 @@ class BackgroundRepair extends TimedJob {
/** @var ILogger */
private $logger;
- /** @var EventDispatcher */
+ /** @var EventDispatcherInterface */
private $dispatcher;
- public function setDispatcher(EventDispatcher $dispatcher) {
+ /**
+ * @param EventDispatcherInterface $dispatcher
+ */
+ public function setDispatcher(EventDispatcherInterface $dispatcher): void {
$this->dispatcher = $dispatcher;
}
+
/**
* run the job, then remove it from the job list
*
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index 2ab3a57e824..72995a96132 100644
--- a/lib/private/Repair.php
+++ b/lib/private/Repair.php
@@ -56,7 +56,7 @@ use OC\Template\SCSSCacher;
use OCP\AppFramework\QueryException;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
-use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
class Repair implements IOutput {
@@ -64,7 +64,7 @@ class Repair implements IOutput {
/** @var IRepairStep[] */
private $repairSteps;
- /** @var EventDispatcher */
+ /** @var EventDispatcherInterface */
private $dispatcher;
/** @var string */
@@ -74,9 +74,9 @@ class Repair implements IOutput {
* Creates a new repair step runner
*
* @param IRepairStep[] $repairSteps array of RepairStep instances
- * @param EventDispatcher $dispatcher
+ * @param EventDispatcherInterface $dispatcher
*/
- public function __construct($repairSteps = [], EventDispatcher $dispatcher = null) {
+ public function __construct(array $repairSteps, EventDispatcherInterface $dispatcher) {
$this->repairSteps = $repairSteps;
$this->dispatcher = $dispatcher;
}