Merge "Setup: Avoid using count() function in any kind of loop(s)"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueue.php
index 7d34f32..4f4728d 100644 (file)
@@ -323,7 +323,7 @@ abstract class JobQueue {
        final public function batchPush( array $jobs, $flags = 0 ) {
                $this->assertNotReadOnly();
 
-               if ( !count( $jobs ) ) {
+               if ( $jobs === [] ) {
                        return; // nothing to do
                }
 
@@ -531,7 +531,7 @@ abstract class JobQueue {
         * @return string
         */
        protected function getRootJobCacheKey( $signature ) {
-               $this->dupCache->makeGlobalKey(
+               return $this->dupCache->makeGlobalKey(
                        'jobqueue',
                        $this->domain,
                        $this->type,