Fix mistakes in JobQueue type documentations
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Fri, 15 Jan 2016 09:31:07 +0000 (10:31 +0100)
committerHoo man <hoo@online.de>
Sat, 16 Jan 2016 00:46:58 +0000 (00:46 +0000)
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
includes/jobqueue/JobQueueRedis.php

index 89948f4..3ff2724 100644 (file)
@@ -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();
 
index 546093f..eda3e9c 100644 (file)
@@ -186,7 +186,7 @@ class JobQueueRedis extends JobQueue {
 
        /**
         * @see JobQueue::doBatchPush()
-        * @param array $jobs
+        * @param IJobSpecification[] $jobs
         * @param int $flags
         * @return void
         * @throws JobQueueError