diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Migration/BackgroundRepair.php | 10 | ||||
-rw-r--r-- | lib/private/Repair.php | 8 |
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; } |