jenkins-bot has submitted this change and it was merged.

Change subject: Remove unused private method check()
......................................................................


Remove unused private method check()

Change-Id: I29381892be9966b92b99cb3b021cc5a9a4be8a80
---
M includes/diff/DairikiDiff.php
1 file changed, 0 insertions(+), 38 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index 37f1e59..164a3cc 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -669,7 +669,6 @@
        function __construct( $from_lines, $to_lines ) {
                $eng = new DiffEngine;
                $this->edits = $eng->diff( $from_lines, $to_lines );
-               // $this->check($from_lines, $to_lines);
        }
 
        /**
@@ -764,43 +763,6 @@
                }
 
                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__ );
        }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/96570
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I29381892be9966b92b99cb3b021cc5a9a4be8a80
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to