45 list( $wordsBefore, $wordsBeforeStripped ) = $this->
split( $linesBefore );
46 list( $wordsAfter, $wordsAfterStripped ) = $this->
split( $linesAfter );
49 parent::__construct( $wordsBeforeStripped, $wordsAfterStripped );
52 $this->edits = [
new DiffOpChange( $linesBefore, $linesAfter ) ];
56 $editCount = count( $this->edits );
57 for ( $i = 0; $i < $editCount; $i++ ) {
58 $orig = &$this->edits[$i]->orig;
59 if ( is_array( $orig ) ) {
60 $orig = array_slice( $wordsBefore, $xi, count( $orig ) );
61 $xi += count( $orig );
64 $closing = &$this->edits[$i]->closing;
65 if ( is_array( $closing ) ) {
66 $closing = array_slice( $wordsAfter, $yi, count( $closing ) );
67 $yi += count( $closing );