@@ -268,8 +268,8 @@ private function isBJunk(string $bString) : bool
268
268
*/
269
269
public function findLongestMatch (int $ alo , int $ ahi , int $ blo , int $ bhi ) : array
270
270
{
271
- $ a = $ this ->old ;
272
- $ b = $ this ->new ;
271
+ $ old = $ this ->old ;
272
+ $ new = $ this ->new ;
273
273
274
274
$ bestI = $ alo ;
275
275
$ bestJ = $ blo ;
@@ -280,7 +280,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
280
280
281
281
for ($ i = $ alo ; $ i < $ ahi ; ++$ i ) {
282
282
$ newJ2Len = array ();
283
- $ jDict = $ this ->arrayGetDefault ($ this ->b2j , $ a [$ i ], $ nothing );
283
+ $ jDict = $ this ->arrayGetDefault ($ this ->b2j , $ old [$ i ], $ nothing );
284
284
foreach ($ jDict as $ jKey => $ j ) {
285
285
if ($ j < $ blo ) {
286
286
continue ;
@@ -302,7 +302,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
302
302
303
303
while ($ bestI > $ alo &&
304
304
$ bestJ > $ blo &&
305
- !$ this ->isBJunk ($ b [$ bestJ - 1 ]) &&
305
+ !$ this ->isBJunk ($ new [$ bestJ - 1 ]) &&
306
306
!$ this ->linesAreDifferent ($ bestI - 1 , $ bestJ - 1 )
307
307
) {
308
308
--$ bestI ;
@@ -312,14 +312,14 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
312
312
313
313
while ($ bestI + $ bestSize < $ ahi &&
314
314
($ bestJ + $ bestSize ) < $ bhi &&
315
- !$ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) &&
315
+ !$ this ->isBJunk ($ new [$ bestJ + $ bestSize ]) &&
316
316
!$ this ->linesAreDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )) {
317
317
++$ bestSize ;
318
318
}
319
319
320
320
while ($ bestI > $ alo &&
321
321
$ bestJ > $ blo &&
322
- $ this ->isBJunk ($ b [$ bestJ - 1 ]) &&
322
+ $ this ->isBJunk ($ new [$ bestJ - 1 ]) &&
323
323
!$ this ->linesAreDifferent ($ bestI - 1 , $ bestJ - 1 )
324
324
) {
325
325
--$ bestI ;
@@ -329,7 +329,7 @@ public function findLongestMatch(int $alo, int $ahi, int $blo, int $bhi) : array
329
329
330
330
while ($ bestI + $ bestSize < $ ahi &&
331
331
$ bestJ + $ bestSize < $ bhi &&
332
- $ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) &&
332
+ $ this ->isBJunk ($ new [$ bestJ + $ bestSize ]) &&
333
333
!$ this ->linesAreDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )
334
334
) {
335
335
++$ bestSize ;
0 commit comments