function WordLevelDiff::closing

Get the closing set of lines.

This reconstructs the $to_lines parameter passed to the constructor.

Return value

array The sequence of strings.

Overrides Diff::closing

File

drupal/core/lib/Drupal/Component/Diff/DiffEngine.php, line 1069
A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)

Class

WordLevelDiff
@todo document @private @subpackage DifferenceEngine

Code

function closing() {
  $closing = new _HWLDF_WordAccumulator();
  foreach ($this->edits as $edit) {
    if ($edit->type == 'copy') {
      $closing
        ->addWords($edit->closing);
    }
    elseif ($edit->closing) {
      $closing
        ->addWords($edit->closing, 'mark');
    }
  }
  $lines = $closing
    ->getLines();
  return $lines;
}