X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdiff%2FDiffFormatter.php;h=07124c02ce7b17d73f0c910e148cb98713726d94;hb=835a1c38f00b601fbcc81a2aad8639160ccb1bc1;hp=23e39ea73bd3a895621ca822df39f4928149fe1a;hpb=7db5b40188c11a11bba84f07eea88fa17cbec94a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/DiffFormatter.php b/includes/diff/DiffFormatter.php index 23e39ea73b..07124c02ce 100644 --- a/includes/diff/DiffFormatter.php +++ b/includes/diff/DiffFormatter.php @@ -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. */