@@ -310,26 +310,24 @@ private function markOuterChange(array &$oldText, array &$newText, int $startOld
310
310
311
311
// Determine the start and end position of the line difference.
312
312
[$ start , $ end ] = $ this ->getOuterChange ($ oldString , $ newString );
313
- if ($ start != 0 || $ end != 0 ) {
314
- // Changes between the lines exist.
315
- // Add markers around the changed character sequence in the old string.
316
- $ sequenceEnd = mb_strlen ($ oldString ) + $ end ;
317
- $ oldString =
318
- mb_substr ($ oldString , 0 , $ start ) . "\0" .
319
- mb_substr ($ oldString , $ start , $ sequenceEnd - $ start ) . "\1" .
320
- mb_substr ($ oldString , $ sequenceEnd );
321
-
322
- // Add markers around the changed character sequence in the new string.
323
- $ sequenceEnd = mb_strlen ($ newString ) + $ end ;
324
- $ newString =
325
- mb_substr ($ newString , 0 , $ start ) . "\0" .
326
- mb_substr ($ newString , $ start , $ sequenceEnd - $ start ) . "\1" .
327
- mb_substr ($ newString , $ sequenceEnd );
328
-
329
- // Overwrite the strings in the old and new text so the changed lines include the markers.
330
- $ oldText [$ startOld + $ iterator ] = $ oldString ;
331
- $ newText [$ startNew + $ iterator ] = $ newString ;
332
- }
313
+ // Changes between the lines exist.
314
+ // Add markers around the changed character sequence in the old string.
315
+ $ sequenceEnd = mb_strlen ($ oldString ) + $ end ;
316
+ $ oldString
317
+ = mb_substr ($ oldString , 0 , $ start ) . "\0" .
318
+ mb_substr ($ oldString , $ start , $ sequenceEnd - $ start ) . "\1" .
319
+ mb_substr ($ oldString , $ sequenceEnd );
320
+
321
+ // Add markers around the changed character sequence in the new string.
322
+ $ sequenceEnd = mb_strlen ($ newString ) + $ end ;
323
+ $ newString
324
+ = mb_substr ($ newString , 0 , $ start ) . "\0" .
325
+ mb_substr ($ newString , $ start , $ sequenceEnd - $ start ) . "\1" .
326
+ mb_substr ($ newString , $ sequenceEnd );
327
+
328
+ // Overwrite the strings in the old and new text so the changed lines include the markers.
329
+ $ oldText [$ startOld + $ iterator ] = $ oldString ;
330
+ $ newText [$ startNew + $ iterator ] = $ newString ;
333
331
}
334
332
}
335
333
0 commit comments