Skip to content

Commit 70e327b

Browse files
committed
Avoid variables with short names
1 parent 5912a3f commit 70e327b

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -566,14 +566,14 @@ public function getGroupedOpCodes(): array
566566

567567
$lastItem = count($opCodes) - 1;
568568
if ($opCodes[$lastItem]['0'] == 'equal') {
569-
[$tag, $i1, $i2, $j1, $j2] = $opCodes[$lastItem];
569+
[$tag, $item1, $item2, $item3, $item4] = $opCodes[$lastItem];
570570
// Remove sequences at the end which are out of context.
571571
$opCodes[$lastItem] = [
572572
$tag,
573-
$i1,
574-
min($i2, $i1 + $this->options['context']),
575-
$j1,
576-
min($j2, $j1 + $this->options['context'])
573+
$item1,
574+
min($item2, $item1 + $this->options['context']),
575+
$item3,
576+
min($item4, $item3 + $this->options['context'])
577577
];
578578
}
579579
}
@@ -582,27 +582,27 @@ public function getGroupedOpCodes(): array
582582
$groups = [];
583583
$group = [];
584584

585-
foreach ($opCodes as [$tag, $i1, $i2, $j1, $j2]) {
586-
if ($tag == 'equal' && $i2 - $i1 > $maxRange) {
585+
foreach ($opCodes as [$tag, $item1, $item2, $item3, $item4]) {
586+
if ($tag == 'equal' && $item2 - $item1 > $maxRange) {
587587
$group[] = [
588588
$tag,
589-
$i1,
590-
min($i2, $i1 + $this->options['context']),
591-
$j1,
592-
min($j2, $j1 + $this->options['context'])
589+
$item1,
590+
min($item2, $item1 + $this->options['context']),
591+
$item3,
592+
min($item4, $item3 + $this->options['context'])
593593
];
594594
$groups[] = $group;
595595
$group = [];
596-
$i1 = max($i1, $i2 - $this->options['context']);
597-
$j1 = max($j1, $j2 - $this->options['context']);
596+
$item1 = max($item1, $item2 - $this->options['context']);
597+
$item3 = max($item3, $item4 - $this->options['context']);
598598
}
599599

600600
$group[] = [
601601
$tag,
602-
$i1,
603-
$i2,
604-
$j1,
605-
$j2
602+
$item1,
603+
$item2,
604+
$item3,
605+
$item4
606606
];
607607
}
608608

0 commit comments

Comments
 (0)