diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-06 11:14:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 11:14:14 +0200 |
commit | 6c825ee9a06d205e4e3b2b2bd2eb86e2039125bb (patch) | |
tree | b1f557c650104b6e615f6ae2aee2da91cbaa983c /lib | |
parent | 2a0c7e258a1103eedb35a43608464835b5157a8d (diff) | |
parent | b1cdd0dd9b020d56a9e4bac97486aefc0d2e4d32 (diff) | |
download | nextcloud-server-6c825ee9a06d205e4e3b2b2bd2eb86e2039125bb.tar.gz nextcloud-server-6c825ee9a06d205e4e3b2b2bd2eb86e2039125bb.zip |
Merge pull request #21665 from nextcloud/debt/noid/job-list
Fix wrong phpdoc for execute method
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/BackgroundJob/Job.php | 23 | ||||
-rw-r--r-- | lib/private/BackgroundJob/TimedJob.php | 3 | ||||
-rw-r--r-- | lib/public/BackgroundJob/IJob.php | 10 |
3 files changed, 13 insertions, 23 deletions
diff --git a/lib/private/BackgroundJob/Job.php b/lib/private/BackgroundJob/Job.php index f0b780d0c70..a464ea2ba1f 100644 --- a/lib/private/BackgroundJob/Job.php +++ b/lib/private/BackgroundJob/Job.php @@ -28,29 +28,20 @@ namespace OC\BackgroundJob; use OCP\BackgroundJob\IJob; +use OCP\BackgroundJob\IJobList; use OCP\ILogger; abstract class Job implements IJob { - /** - * @var int $id - */ + /** @var int */ protected $id; - /** - * @var int $lastRun - */ + /** @var int */ protected $lastRun; - /** - * @var mixed $argument - */ + /** @var mixed */ protected $argument; - /** - * @param JobList $jobList - * @param ILogger|null $logger - */ - public function execute($jobList, ILogger $logger = null) { + public function execute(IJobList $jobList, ILogger $logger = null) { $jobList->setLastRun($this); if ($logger === null) { $logger = \OC::$server->getLogger(); @@ -76,11 +67,11 @@ abstract class Job implements IJob { abstract protected function run($argument); - public function setId($id) { + public function setId(int $id) { $this->id = $id; } - public function setLastRun($lastRun) { + public function setLastRun(int $lastRun) { $this->lastRun = $lastRun; } diff --git a/lib/private/BackgroundJob/TimedJob.php b/lib/private/BackgroundJob/TimedJob.php index e5dfeb96c9c..d33cdd90b37 100644 --- a/lib/private/BackgroundJob/TimedJob.php +++ b/lib/private/BackgroundJob/TimedJob.php @@ -25,6 +25,7 @@ namespace OC\BackgroundJob; +use OCP\BackgroundJob\IJobList; use OCP\ILogger; /** @@ -49,7 +50,7 @@ abstract class TimedJob extends Job { /** * run the job if * - * @param JobList $jobList + * @param IJobList $jobList * @param ILogger|null $logger */ public function execute($jobList, ILogger $logger = null) { diff --git a/lib/public/BackgroundJob/IJob.php b/lib/public/BackgroundJob/IJob.php index 985b5e973b6..a61f70a3cf4 100644 --- a/lib/public/BackgroundJob/IJob.php +++ b/lib/public/BackgroundJob/IJob.php @@ -38,23 +38,21 @@ interface IJob { /** * Run the background job with the registered argument * - * @param \OCP\BackgroundJob\IJobList $jobList The job list that manages the state of this job + * @param IJobList $jobList The job list that manages the state of this job * @param ILogger|null $logger * @since 7.0.0 */ - public function execute($jobList, ILogger $logger = null); + public function execute(IJobList $jobList, ILogger $logger = null); /** - * @param int $id * @since 7.0.0 */ - public function setId($id); + public function setId(int $id); /** - * @param int $lastRun * @since 7.0.0 */ - public function setLastRun($lastRun); + public function setLastRun(int $lastRun); /** * @param mixed $argument |