From d22a14639364dc7f8e0d796f164c0f6c682d7640 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Fri, 15 Jan 2016 10:31:07 +0100 Subject: [PATCH] Fix mistakes in JobQueue type documentations The missing "bool" should be obvious. I'm also changing type hints from the implementation to the interface. All public methods from the JobSpecification class are also in the interface, except for two: toSerializableArray and newFromArray. These two are not used here. Change-Id: I36867cdfdf012a4f3233ac4730ab46dac1edc0ab --- includes/jobqueue/JobQueue.php | 8 ++++---- includes/jobqueue/JobQueueRedis.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php index 89948f46ba..3ff2724e94 100644 --- a/includes/jobqueue/JobQueue.php +++ b/includes/jobqueue/JobQueue.php @@ -286,7 +286,7 @@ abstract class JobQueue { * This does not require $wgJobClasses to be set for the given job type. * Outside callers should use JobQueueGroup::push() instead of this function. * - * @param JobSpecification|JobSpecification[] $jobs + * @param IJobSpecification|IJobSpecification[] $jobs * @param int $flags Bitfield (supports JobQueue::QOS_ATOMIC) * @return void * @throws JobQueueError @@ -301,7 +301,7 @@ abstract class JobQueue { * This does not require $wgJobClasses to be set for the given job type. * Outside callers should use JobQueueGroup::push() instead of this function. * - * @param JobSpecification[] $jobs + * @param IJobSpecification[] $jobs * @param int $flags Bitfield (supports JobQueue::QOS_ATOMIC) * @return void * @throws MWException @@ -333,7 +333,7 @@ abstract class JobQueue { /** * @see JobQueue::batchPush() - * @param JobSpecification[] $jobs + * @param IJobSpecification[] $jobs * @param int $flags */ abstract protected function doBatchPush( array $jobs, $flags ); @@ -377,7 +377,7 @@ abstract class JobQueue { /** * @see JobQueue::pop() - * @return Job + * @return Job|bool */ abstract protected function doPop(); diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index 546093f4d9..eda3e9ccc3 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -186,7 +186,7 @@ class JobQueueRedis extends JobQueue { /** * @see JobQueue::doBatchPush() - * @param array $jobs + * @param IJobSpecification[] $jobs * @param int $flags * @return void * @throws JobQueueError -- 2.20.1