48 [ $wordsBefore, $wordsBeforeStripped ] = $this->split( $linesBefore );
49 [ $wordsAfter, $wordsAfterStripped ] = $this->split( $linesAfter );
52 parent::__construct( $wordsBeforeStripped, $wordsAfterStripped );
55 $this->edits = [
new DiffOpChange( $linesBefore, $linesAfter ) ];
59 $editCount = count( $this->edits );
60 for ( $i = 0; $i < $editCount; $i++ ) {
61 $orig = &$this->edits[$i]->orig;
62 if ( is_array( $orig ) ) {
63 $orig = array_slice( $wordsBefore, $xi, count( $orig ) );
64 $xi += count( $orig );
67 $closing = &$this->edits[$i]->closing;
68 if ( is_array( $closing ) ) {
69 $closing = array_slice( $wordsAfter, $yi, count( $closing ) );
70 $yi += count( $closing );