Skip to content

Commit 8a699ef

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

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ private function isBJunk(string $bString) : bool
268268
*/
269269
public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
270270
{
271-
$a = $this->old;
272-
$b = $this->new;
271+
$old = $this->old;
272+
$new = $this->new;
273273

274274
$bestI = $alo;
275275
$bestJ = $blo;
@@ -280,7 +280,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
280280

281281
for ($i = $alo; $i < $ahi; ++$i) {
282282
$newJ2Len = array();
283-
$jDict = $this->arrayGetDefault($this->b2j, $a[$i], $nothing);
283+
$jDict = $this->arrayGetDefault($this->b2j, $old[$i], $nothing);
284284
foreach ($jDict as $jKey => $j) {
285285
if ($j < $blo) {
286286
continue;
@@ -302,7 +302,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
302302

303303
while ($bestI > $alo &&
304304
$bestJ > $blo &&
305-
!$this->isBJunk($b[$bestJ - 1]) &&
305+
!$this->isBJunk($new[$bestJ - 1]) &&
306306
!$this->linesAreDifferent($bestI - 1, $bestJ - 1)
307307
) {
308308
--$bestI;
@@ -312,14 +312,14 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
312312

313313
while ($bestI + $bestSize < $ahi &&
314314
($bestJ + $bestSize) < $bhi &&
315-
!$this->isBJunk($b[$bestJ + $bestSize]) &&
315+
!$this->isBJunk($new[$bestJ + $bestSize]) &&
316316
!$this->linesAreDifferent($bestI + $bestSize, $bestJ + $bestSize)) {
317317
++$bestSize;
318318
}
319319

320320
while ($bestI > $alo &&
321321
$bestJ > $blo &&
322-
$this->isBJunk($b[$bestJ - 1]) &&
322+
$this->isBJunk($new[$bestJ - 1]) &&
323323
!$this->linesAreDifferent($bestI - 1, $bestJ - 1)
324324
) {
325325
--$bestI;
@@ -329,7 +329,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
329329

330330
while ($bestI + $bestSize < $ahi &&
331331
$bestJ + $bestSize < $bhi &&
332-
$this->isBJunk($b[$bestJ + $bestSize]) &&
332+
$this->isBJunk($new[$bestJ + $bestSize]) &&
333333
!$this->linesAreDifferent($bestI + $bestSize, $bestJ + $bestSize)
334334
) {
335335
++$bestSize;

0 commit comments

Comments
 (0)