Merge "Use PHP 7 '??' operator instead of if-then-else"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueGroup.php
index 820c492..c05feb4 100644 (file)
@@ -105,11 +105,7 @@ class JobQueueGroup {
                global $wgJobTypeConf;
 
                $conf = [ 'wiki' => $this->wiki, 'type' => $type ];
-               if ( isset( $wgJobTypeConf[$type] ) ) {
-                       $conf = $conf + $wgJobTypeConf[$type];
-               } else {
-                       $conf = $conf + $wgJobTypeConf['default'];
-               }
+               $conf += $wgJobTypeConf[$type] ?? $wgJobTypeConf['default'];
                $conf['aggregator'] = JobQueueAggregator::singleton();
                if ( !isset( $conf['readOnlyReason'] ) ) {
                        $conf['readOnlyReason'] = $this->readOnlyReason;