From: Siebrand Mazeland Date: Wed, 20 Nov 2013 19:41:58 +0000 (+0100) Subject: Remove unused private method check() X-Git-Tag: 1.31.0-rc.0~17988^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=dcb0471e19c6c2c1fed0c08db48c700d1d97e832;p=lhc%2Fweb%2Fwiklou.git Remove unused private method check() Change-Id: I29381892be9966b92b99cb3b021cc5a9a4be8a80 --- diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index 37f1e59bff..164a3cc788 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -669,7 +669,6 @@ class Diff { function __construct( $from_lines, $to_lines ) { $eng = new DiffEngine; $this->edits = $eng->diff( $from_lines, $to_lines ); - // $this->check($from_lines, $to_lines); } /** @@ -765,43 +764,6 @@ class Diff { return $lines; } - - /** - * Check a Diff for validity. - * - * This is here only for debugging purposes. - * @param $from_lines - * @param $to_lines - */ - private function check( $from_lines, $to_lines ) { - wfProfileIn( __METHOD__ ); - if ( serialize( $from_lines ) != serialize( $this->orig() ) ) { - trigger_error( "Reconstructed original doesn't match", E_USER_ERROR ); - } - if ( serialize( $to_lines ) != serialize( $this->closing() ) ) { - trigger_error( "Reconstructed closing doesn't match", E_USER_ERROR ); - } - - $rev = $this->reverse(); - if ( serialize( $to_lines ) != serialize( $rev->orig() ) ) { - trigger_error( "Reversed original doesn't match", E_USER_ERROR ); - } - if ( serialize( $from_lines ) != serialize( $rev->closing() ) ) { - trigger_error( "Reversed closing doesn't match", E_USER_ERROR ); - } - - $prevtype = 'none'; - foreach ( $this->edits as $edit ) { - if ( $prevtype == $edit->type ) { - trigger_error( 'Edit sequence is non-optimal', E_USER_ERROR ); - } - $prevtype = $edit->type; - } - - $lcs = $this->lcs(); - trigger_error( 'Diff okay: LCS = ' . $lcs, E_USER_NOTICE ); - wfProfileOut( __METHOD__ ); - } } /**