Merge "jobqueue: remove entire unused JobQueueAggregator class hierarchy"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueGroup.php
index 8f853d9..b9c4157 100644 (file)
@@ -352,12 +352,14 @@ class JobQueueGroup {
        /**
         * Get the list of job types that have non-empty queues
         *
-        * @return array List of job types that have non-empty queues
+        * @return string[] List of job types that have non-empty queues
         */
        public function getQueuesWithJobs() {
                $types = [];
                foreach ( $this->getCoalescedQueues() as $info ) {
-                       $nonEmpty = $info['queue']->getSiblingQueuesWithJobs( $this->getQueueTypes() );
+                       /** @var JobQueue $queue */
+                       $queue = $info['queue'];
+                       $nonEmpty = $queue->getSiblingQueuesWithJobs( $this->getQueueTypes() );
                        if ( is_array( $nonEmpty ) ) { // batching features supported
                                $types = array_merge( $types, $nonEmpty );
                        } else { // we have to go through the queues in the bucket one-by-one
@@ -375,12 +377,14 @@ class JobQueueGroup {
        /**
         * Get the size of the queus for a list of job types
         *
-        * @return array Map of (job type => size)
+        * @return int[] Map of (job type => size)
         */
        public function getQueueSizes() {
                $sizeMap = [];
                foreach ( $this->getCoalescedQueues() as $info ) {
-                       $sizes = $info['queue']->getSiblingQueueSizes( $this->getQueueTypes() );
+                       /** @var JobQueue $queue */
+                       $queue = $info['queue'];
+                       $sizes = $queue->getSiblingQueueSizes( $this->getQueueTypes() );
                        if ( is_array( $sizes ) ) { // batching features supported
                                $sizeMap = $sizeMap + $sizes;
                        } else { // we have to go through the queues in the bucket one-by-one
@@ -394,7 +398,7 @@ class JobQueueGroup {
        }
 
        /**
-        * @return array
+        * @return JobQueue[]
         */
        protected function getCoalescedQueues() {
                global $wgJobTypeConf;