mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Fix typos in detectCopiedCode()
Auditors: epriestley
This commit is contained in:
parent
13a48a79d7
commit
6fd99e287b
2 changed files with 3 additions and 3 deletions
|
@ -187,10 +187,10 @@ final class DifferentialDiff extends DifferentialDAO {
|
|||
// Search also backwards for short lines.
|
||||
foreach (array(-1, 1) as $direction) {
|
||||
$offset = $direction;
|
||||
$orig_code = idx($files[$file], $orig_line + $offset);
|
||||
while (!isset($copies[$line + $offset]) &&
|
||||
isset($added[$line + $offset]) &&
|
||||
$orig_code === $added[$line + $offset]) {
|
||||
idx($files[$file], $orig_line + $offset) ===
|
||||
$added[$line + $offset]) {
|
||||
$lengths["$orig_line:$file"]++;
|
||||
$offset += $direction;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ final class DifferentialHunk extends DifferentialDAO {
|
|||
continue;
|
||||
}
|
||||
if ($diff_line[0] == '+') {
|
||||
$lines[$n] = substr($diff_line, 1);
|
||||
$lines[$n] = (string)substr($diff_line, 1); // substr('+', 1) === false
|
||||
}
|
||||
if ($diff_line[0] != '-') {
|
||||
$n++;
|
||||
|
|
Loading…
Reference in a new issue