Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Text/Diff/Engine/native.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function _shiftBoundaries($lines, &$changed, $other_changed)
$i = 0;
$j = 0;

assert('count($lines) == count($changed)');
assert(count($lines) == count($changed));
$len = count($lines);
$other_len = count($other_changed);

Expand All @@ -353,7 +353,7 @@ function _shiftBoundaries($lines, &$changed, $other_changed)
}

while ($i < $len && ! $changed[$i]) {
assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && ! $other_changed[$j]);
$i++; $j++;
while ($j < $other_len && $other_changed[$j]) {
$j++;
Expand Down Expand Up @@ -385,11 +385,11 @@ function _shiftBoundaries($lines, &$changed, $other_changed)
while ($start > 0 && $changed[$start - 1]) {
$start--;
}
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}

/* Set CORRESPONDING to the end of the changed run, at the
Expand All @@ -410,7 +410,7 @@ function _shiftBoundaries($lines, &$changed, $other_changed)
$i++;
}

assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && ! $other_changed[$j]);
$j++;
if ($j < $other_len && $other_changed[$j]) {
$corresponding = $i;
Expand All @@ -426,11 +426,11 @@ function _shiftBoundaries($lines, &$changed, $other_changed)
while ($corresponding < $i) {
$changed[--$start] = 1;
$changed[--$i] = 0;
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Text/Diff/Engine/shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function diff($from_lines, $to_lines)

if ($from_line_no < $match[1] || $to_line_no < $match[4]) {
// copied lines
assert('$match[1] - $from_line_no == $match[4] - $to_line_no');
assert($match[1] - $from_line_no == $match[4] - $to_line_no);
array_push($edits,
new Text_Diff_Op_copy(
$this->_getLines($from_lines, $from_line_no, $match[1] - 1),
Expand Down