Merge "Normalize "LEFT OUTER JOIN" to "LEFT JOIN" in SQL queries"
[lhc/web/wiklou.git] / maintenance / updateCollation.php
index 0670454..ab40e48 100644 (file)
@@ -142,7 +142,6 @@ TEXT
                        wfWaitForSlaves();
                }
                $count = 0;
-               $batchCount = 0;
                $batchConds = [];
                do {
                        $this->output( "Selecting next " . self::BATCH_SIZE . " rows..." );
@@ -304,11 +303,7 @@ TEXT
                        if ( $raw !== '' ) {
                                $raw .= ', ';
                        }
-                       if ( !isset( $this->sizeHistogram[$i] ) ) {
-                               $val = 0;
-                       } else {
-                               $val = $this->sizeHistogram[$i];
-                       }
+                       $val = $this->sizeHistogram[$i] ?? 0;
                        for ( $coarseIndex = 0; $coarseIndex < $numBins - 1; $coarseIndex++ ) {
                                if ( $coarseBoundaries[$coarseIndex] > $i ) {
                                        $coarseHistogram[$coarseIndex] += $val;
@@ -327,11 +322,7 @@ TEXT
                $scale = 60 / $maxBinVal;
                $prevBoundary = 0;
                for ( $coarseIndex = 0; $coarseIndex < $numBins; $coarseIndex++ ) {
-                       if ( !isset( $coarseHistogram[$coarseIndex] ) ) {
-                               $val = 0;
-                       } else {
-                               $val = $coarseHistogram[$coarseIndex];
-                       }
+                       $val = $coarseHistogram[$coarseIndex] ?? 0;
                        $boundary = $coarseBoundaries[$coarseIndex];
                        $this->output( sprintf( "%-10s %-10d |%s\n",
                                $prevBoundary . '-' . ( $boundary - 1 ) . ': ',