Fix some JobQueue IDEA errors
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 4 Mar 2016 19:33:52 +0000 (11:33 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 8 Mar 2016 11:23:13 +0000 (03:23 -0800)
Change-Id: I624f65ee1ca97c1acae9b54ca36d910eb4e42a70

includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueFederated.php

index aaf9fb0..479ec32 100644 (file)
@@ -452,7 +452,6 @@ class JobQueueDB extends JobQueue {
         * @see JobQueue::doAck()
         * @param Job $job
         * @throws MWException
-        * @return Job|bool
         */
        protected function doAck( Job $job ) {
                if ( !isset( $job->metadata['id'] ) ) {
@@ -476,8 +475,6 @@ class JobQueueDB extends JobQueue {
                } catch ( DBError $e ) {
                        $this->throwDBException( $e );
                }
-
-               return true;
        }
 
        /**
index c127239..bd832db 100644 (file)
@@ -49,7 +49,7 @@
 class JobQueueFederated extends JobQueue {
        /** @var HashRing */
        protected $partitionRing;
-       /** @var array (partition name => JobQueue) reverse sorted by weight */
+       /** @var JobQueue[] (partition name => JobQueue) reverse sorted by weight */
        protected $partitionQueues = [];
 
        /** @var int Maximum number of partitions to try */
@@ -311,7 +311,7 @@ class JobQueueFederated extends JobQueue {
                        throw new MWException( "The given job has no defined partition name." );
                }
 
-               return $this->partitionQueues[$job->metadata['QueuePartition']]->ack( $job );
+               $this->partitionQueues[$job->metadata['QueuePartition']]->ack( $job );
        }
 
        protected function doIsRootJobOldDuplicate( Job $job ) {