Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git] / includes / diff / DiffFormatter.php
index 23e39ea..07124c0 100644 (file)
@@ -60,10 +60,9 @@ abstract class DiffFormatter {
         * @return string The formatted output.
         */
        public function format( $diff ) {
-
                $xi = $yi = 1;
                $block = false;
-               $context = array();
+               $context = [];
 
                $nlead = $this->leadingContextLines;
                $ntrail = $this->trailingContextLines;
@@ -94,7 +93,7 @@ abstract class DiffFormatter {
                                        $context = array_slice( $context, count( $context ) - $nlead );
                                        $x0 = $xi - count( $context );
                                        $y0 = $yi - count( $context );
-                                       $block = array();
+                                       $block = [];
                                        if ( $context ) {
                                                $block[] = new DiffOpCopy( $context );
                                        }
@@ -126,7 +125,7 @@ abstract class DiffFormatter {
         * @param int $xlen
         * @param int $ybeg
         * @param int $ylen
-        * @param array $edits
+        * @param array &$edits
         *
         * @throws MWException If the edit type is not known.
         */