function WordLevelDiff::closing in Diff 5
Same name and namespace in other branches
- 5.2 DiffEngine.php \WordLevelDiff::closing()
- 6.2 DiffEngine.php \WordLevelDiff::closing()
- 6 DiffEngine.php \WordLevelDiff::closing()
- 7.3 DiffEngine.php \WordLevelDiff::closing()
- 7.2 DiffEngine.php \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
- ./
DiffEngine.php, line 1016
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;
}