@@ -273,14 +273,14 @@ public function findLongestMatch($alo, $ahi, $blo, $bhi)
273273 }
274274
275275 while ($ bestI > $ alo && $ bestJ > $ blo && !$ this ->isBJunk ($ b [$ bestJ - 1 ]) &&
276- !$ this ->isLineDifferent ($ bestI - 1 , $ bestJ - 1 )) {
276+ !$ this ->linesAreDifferent ($ bestI - 1 , $ bestJ - 1 )) {
277277 --$ bestI ;
278278 --$ bestJ ;
279279 ++$ bestSize ;
280280 }
281281
282282 while ($ bestI + $ bestSize < $ ahi && ($ bestJ + $ bestSize ) < $ bhi &&
283- !$ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) && !$ this ->isLineDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )) {
283+ !$ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) && !$ this ->linesAreDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )) {
284284 ++$ bestSize ;
285285 }
286286
@@ -292,7 +292,7 @@ public function findLongestMatch($alo, $ahi, $blo, $bhi)
292292 }
293293
294294 while ($ bestI + $ bestSize < $ ahi && $ bestJ + $ bestSize < $ bhi &&
295- $ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) && !$ this ->isLineDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )) {
295+ $ this ->isBJunk ($ b [$ bestJ + $ bestSize ]) && !$ this ->linesAreDifferent ($ bestI + $ bestSize , $ bestJ + $ bestSize )) {
296296 ++$ bestSize ;
297297 }
298298
@@ -303,7 +303,14 @@ public function findLongestMatch($alo, $ahi, $blo, $bhi)
303303 );
304304 }
305305
306- public function isLineDifferent ($ aIndex , $ bIndex )
306+ /**
307+ * Check if the two lines at the given indexes are different or not.
308+ *
309+ * @param int $aIndex Line number to check against in a.
310+ * @param int $bIndex Line number to check against in b.
311+ * @return boolean True if the lines are different and false if not.
312+ */
313+ public function linesAreDifferent ($ aIndex , $ bIndex )
307314 {
308315 $ lineA = $ this ->a [$ aIndex ];
309316 $ lineB = $ this ->b [$ bIndex ];
0 commit comments