Linker: Don't use Title::setFragment()
[lhc/web/wiklou.git] / maintenance / copyJobQueue.php
index 42c2dd4..e1d697d 100644 (file)
@@ -55,10 +55,10 @@ class CopyJobQueue extends Maintenance {
 
                $types = ( $this->getOption( 'type' ) === 'all' )
                        ? JobQueueGroup::singleton()->getQueueTypes()
-                       : array( $this->getOption( 'type' ) );
+                       : [ $this->getOption( 'type' ) ];
 
                foreach ( $types as $type ) {
-                       $baseConfig = array( 'type' => $type, 'wiki' => wfWikiID() );
+                       $baseConfig = [ 'type' => $type, 'wiki' => wfWikiID() ];
                        $src = JobQueue::factory( $baseConfig + $wgJobQueueMigrationConfig[$srcKey] );
                        $dst = JobQueue::factory( $baseConfig + $wgJobQueueMigrationConfig[$dstKey] );
 
@@ -73,14 +73,14 @@ class CopyJobQueue extends Maintenance {
        protected function copyJobs( JobQueue $src, JobQueue $dst, $jobs ) {
                $total = 0;
                $totalOK = 0;
-               $batch = array();
+               $batch = [];
                foreach ( $jobs as $job ) {
                        ++$total;
                        $batch[] = $job;
                        if ( count( $batch ) >= $this->mBatchSize ) {
                                $dst->push( $batch );
                                $totalOK += count( $batch );
-                               $batch = array();
+                               $batch = [];
                                $dst->waitForBackups();
                        }
                }
@@ -90,7 +90,7 @@ class CopyJobQueue extends Maintenance {
                        $dst->waitForBackups();
                }
 
-               return array( $total, $totalOK );
+               return [ $total, $totalOK ];
        }
 }