Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / diff / DairikiDiff.php
index bc57c93..6272e7e 100644 (file)
@@ -249,8 +249,8 @@ class DiffEngine {
                $edits = [];
                $xi = $yi = 0;
                while ( $xi < $n_from || $yi < $n_to ) {
-                       assert( '$yi < $n_to || $this->xchanged[$xi]' );
-                       assert( '$xi < $n_from || $this->ychanged[$yi]' );
+                       assert( $yi < $n_to || $this->xchanged[$xi] );
+                       assert( $xi < $n_from || $this->ychanged[$yi] );
 
                        // Skip matching "snake".
                        $copy = [];
@@ -448,7 +448,7 @@ class DiffEngine {
                                while ( list( , $y ) = each( $matches ) ) {
                                        if ( empty( $this->in_seq[$y] ) ) {
                                                $k = $this->lcsPos( $y );
-                                               assert( '$k > 0' );
+                                               assert( $k > 0 );
                                                $ymids[$k] = $ymids[$k - 1];
                                                break;
                                        }
@@ -456,7 +456,7 @@ class DiffEngine {
 
                                while ( list( , $y ) = each( $matches ) ) {
                                        if ( $y > $this->seq[$k - 1] ) {
-                                               assert( '$y < $this->seq[$k]' );
+                                               assert( $y < $this->seq[$k] );
                                                // Optimization: this is a common case:
                                                // next match is just replacing previous match.
                                                $this->in_seq[$this->seq[$k]] = false;
@@ -464,7 +464,7 @@ class DiffEngine {
                                                $this->in_seq[$y] = 1;
                                        } elseif ( empty( $this->in_seq[$y] ) ) {
                                                $k = $this->lcsPos( $y );
-                                               assert( '$k > 0' );
+                                               assert( $k > 0 );
                                                $ymids[$k] = $ymids[$k - 1];
                                        }
                                }
@@ -507,7 +507,7 @@ class DiffEngine {
                        }
                }
 
-               assert( '$ypos != $this->seq[$end]' );
+               assert( $ypos != $this->seq[$end] );
 
                $this->in_seq[$this->seq[$end]] = false;
                $this->seq[$end] = $ypos;
@@ -595,7 +595,7 @@ class DiffEngine {
                $i = 0;
                $j = 0;
 
-               assert( 'count($lines) == count($changed)' );
+               assert( count( $lines ) == count( $changed ) );
                $len = count( $lines );
                $other_len = count( $other_changed );
 
@@ -616,7 +616,7 @@ class DiffEngine {
                        }
 
                        while ( $i < $len && !$changed[$i] ) {
-                               assert( '$j < $other_len && ! $other_changed[$j]' );
+                               assert( $j < $other_len && ! $other_changed[$j] );
                                $i++;
                                $j++;
                                while ( $j < $other_len && $other_changed[$j] ) {
@@ -653,11 +653,11 @@ class DiffEngine {
                                        while ( $start > 0 && $changed[$start - 1] ) {
                                                $start--;
                                        }
-                                       assert( '$j > 0' );
+                                       assert( $j > 0 );
                                        while ( $other_changed[--$j] ) {
                                                continue;
                                        }
-                                       assert( '$j >= 0 && !$other_changed[$j]' );
+                                       assert( $j >= 0 && !$other_changed[$j] );
                                }
 
                                /*
@@ -681,7 +681,7 @@ class DiffEngine {
                                                $i++;
                                        }
 
-                                       assert( '$j < $other_len && ! $other_changed[$j]' );
+                                       assert( $j < $other_len && ! $other_changed[$j] );
                                        $j++;
                                        if ( $j < $other_len && $other_changed[$j] ) {
                                                $corresponding = $i;
@@ -699,11 +699,11 @@ class DiffEngine {
                        while ( $corresponding < $i ) {
                                $changed[--$start] = 1;
                                $changed[--$i] = 0;
-                               assert( '$j > 0' );
+                               assert( $j > 0 );
                                while ( $other_changed[--$j] ) {
                                        continue;
                                }
-                               assert( '$j >= 0 && !$other_changed[$j]' );
+                               assert( $j >= 0 && !$other_changed[$j] );
                        }
                }
        }
@@ -867,8 +867,8 @@ class MappedDiff extends Diff {
        public function __construct( $from_lines, $to_lines,
                $mapped_from_lines, $mapped_to_lines ) {
 
-               assert( 'count( $from_lines ) == count( $mapped_from_lines )' );
-               assert( 'count( $to_lines ) == count( $mapped_to_lines )' );
+               assert( count( $from_lines ) == count( $mapped_from_lines ) );
+               assert( count( $to_lines ) == count( $mapped_to_lines ) );
 
                parent::__construct( $mapped_from_lines, $mapped_to_lines );
 
@@ -959,7 +959,7 @@ class HWLDFWordAccumulator {
                                $this->flushLine( $tag );
                                $word = substr( $word, 1 );
                        }
-                       assert( '!strstr( $word, "\n" )' );
+                       assert( !strstr( $word, "\n" ) );
                        $this->group .= $word;
                }
        }