You are here

function Diff::closing in Diff 5

Same name and namespace in other branches
  1. 5.2 DiffEngine.php \Diff::closing()
  2. 6.2 DiffEngine.php \Diff::closing()
  3. 6 DiffEngine.php \Diff::closing()
  4. 7.3 DiffEngine.php \Diff::closing()
  5. 7.2 DiffEngine.php \Diff::closing()

* Get the closing set of lines. * * This reconstructs the $to_lines parameter passed to the * constructor. * *

Return value

array The sequence of strings.

1 call to Diff::closing()
Diff::_check in ./DiffEngine.php
* Check a Diff for validity. * * This is here only for debugging purposes.
1 method overrides Diff::closing()
WordLevelDiff::closing in ./DiffEngine.php
* Get the closing set of lines. * * This reconstructs the $to_lines parameter passed to the * constructor. * *

File

./DiffEngine.php, line 629

Class

Diff
Class representing a 'diff' between two sequences of strings. @todo document @private @subpackage DifferenceEngine

Code

function closing() {
  $lines = array();
  foreach ($this->edits as $edit) {
    if ($edit->closing) {
      array_splice($lines, sizeof($lines), 0, $edit->closing);
    }
  }
  return $lines;
}