diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-14 16:35:12 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-14 16:35:12 +0100 |
commit | 96253c7c1b02c9e3a5506198c179dd7a32d01fbe (patch) | |
tree | 3c35cede81cf3978d1553ff1932c5818a9dd86d4 /apps/federation/lib/BackgroundJob | |
parent | 39bee7948d44c2f5d6f5465bc9c4c3ffe6b8c34e (diff) | |
download | nextcloud-server-96253c7c1b02c9e3a5506198c179dd7a32d01fbe.tar.gz nextcloud-server-96253c7c1b02c9e3a5506198c179dd7a32d01fbe.zip |
Add missing parent::__construct() calls to Jobs
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/federation/lib/BackgroundJob')
-rw-r--r-- | apps/federation/lib/BackgroundJob/GetSharedSecret.php | 11 | ||||
-rw-r--r-- | apps/federation/lib/BackgroundJob/RequestSharedSecret.php | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php index 71ea5417dd0..9390b047a91 100644 --- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php @@ -71,9 +71,6 @@ class GetSharedSecret extends Job { /** @var ILogger */ private $logger; - /** @var ITimeFactory */ - private $timeFactory; - /** @var bool */ protected $retainJob = false; @@ -102,13 +99,13 @@ class GetSharedSecret extends Job { IDiscoveryService $ocsDiscoveryService, ITimeFactory $timeFactory ) { + parent::__construct($timeFactory); $this->logger = $logger; $this->httpClient = $httpClientService->newClient(); $this->jobList = $jobList; $this->urlGenerator = $urlGenerator; $this->ocsDiscoveryService = $ocsDiscoveryService; $this->trustedServers = $trustedServers; - $this->timeFactory = $timeFactory; } /** @@ -143,8 +140,8 @@ class GetSharedSecret extends Job { protected function run($argument) { $target = $argument['url']; - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); - $currentTime = $this->timeFactory->getTime(); + $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); + $currentTime = $this->time->getTime(); $source = $this->urlGenerator->getAbsoluteURL('/'); $source = rtrim($source, '/'); $token = $argument['token']; @@ -239,7 +236,7 @@ class GetSharedSecret extends Job { */ protected function reAddJob(array $argument) { $url = $argument['url']; - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); + $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); $token = $argument['token']; $this->jobList->add( GetSharedSecret::class, diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php index 1c9b2539b3d..c9bee9fa6be 100644 --- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php @@ -69,9 +69,6 @@ class RequestSharedSecret extends Job { /** @var ILogger */ private $logger; - /** @var ITimeFactory */ - private $timeFactory; - /** @var bool */ protected $retainJob = false; @@ -100,13 +97,13 @@ class RequestSharedSecret extends Job { ILogger $logger, ITimeFactory $timeFactory ) { + parent::__construct($timeFactory); $this->httpClient = $httpClientService->newClient(); $this->jobList = $jobList; $this->urlGenerator = $urlGenerator; $this->logger = $logger; $this->ocsDiscoveryService = $ocsDiscoveryService; $this->trustedServers = $trustedServers; - $this->timeFactory = $timeFactory; } @@ -142,8 +139,8 @@ class RequestSharedSecret extends Job { protected function run($argument) { $target = $argument['url']; - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); - $currentTime = $this->timeFactory->getTime(); + $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); + $currentTime = $this->time->getTime(); $source = $this->urlGenerator->getAbsoluteURL('/'); $source = rtrim($source, '/'); $token = $argument['token']; @@ -211,7 +208,7 @@ class RequestSharedSecret extends Job { */ protected function reAddJob(array $argument) { $url = $argument['url']; - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); + $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); $token = $argument['token']; $this->jobList->add( |