* @return string The formatted output.
*/
public function format( $diff ) {
-
$xi = $yi = 1;
$block = false;
- $context = array();
+ $context = [];
$nlead = $this->leadingContextLines;
$ntrail = $this->trailingContextLines;
$context = array_slice( $context, count( $context ) - $nlead );
$x0 = $xi - count( $context );
$y0 = $yi - count( $context );
- $block = array();
+ $block = [];
if ( $context ) {
$block[] = new DiffOpCopy( $context );
}
* @param int $xlen
* @param int $ybeg
* @param int $ylen
- * @param array $edits
+ * @param array &$edits
*
* @throws MWException If the edit type is not known.
*/