Skip to content

Commit f75c870

Browse files
committed
avoid short variable names
1 parent 8a699ef commit f75c870

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -404,23 +404,23 @@ public function getMatchingBlocks() : array
404404
while (!empty($queue)) {
405405
list($alo, $ahi, $blo, $bhi) = array_pop($queue);
406406
$longestMatch = $this->findLongestMatch($alo, $ahi, $blo, $bhi);
407-
list($i, $j, $k) = $longestMatch;
408-
if ($k) {
407+
list($list1, $list2, $list3) = $longestMatch;
408+
if ($list3) {
409409
$matchingBlocks[] = $longestMatch;
410-
if ($alo < $i && $blo < $j) {
410+
if ($alo < $list1 && $blo < $list2) {
411411
$queue[] = array(
412412
$alo,
413-
$i,
413+
$list1,
414414
$blo,
415-
$j
415+
$list2
416416
);
417417
}
418418

419-
if ($i + $k < $ahi && $j + $k < $bhi) {
419+
if ($list1 + $list3 < $ahi && $list2 + $list3 < $bhi) {
420420
$queue[] = array(
421-
$i + $k,
421+
$list1 + $list3,
422422
$ahi,
423-
$j + $k,
423+
$list2 + $list3,
424424
$bhi
425425
);
426426
}
@@ -439,9 +439,9 @@ function ($aArray, $bArray) {
439439
$k1 = 0;
440440
$nonAdjacent = array();
441441
foreach ($matchingBlocks as $block) {
442-
list($i2, $j2, $k2) = $block;
443-
if ($i1 + $k1 == $i2 && $j1 + $k1 == $j2) {
444-
$k1 += $k2;
442+
list($list4, $list5, $list6) = $block;
443+
if ($i1 + $k1 == $list4 && $j1 + $k1 == $list5) {
444+
$k1 += $list6;
445445
} else {
446446
if ($k1) {
447447
$nonAdjacent[] = array(
@@ -451,9 +451,9 @@ function ($aArray, $bArray) {
451451
);
452452
}
453453

454-
$i1 = $i2;
455-
$j1 = $j2;
456-
$k1 = $k2;
454+
$i1 = $list4;
455+
$j1 = $list5;
456+
$k1 = $list6;
457457
}
458458
}
459459

0 commit comments

Comments
 (0)