@@ -308,14 +308,8 @@ public function getGroupedOpcodes(): array
308308 return $ this ->groupedOpcodes ;
309309 }
310310
311- if ($ this ->options ['ignoreLineEnding ' ]) {
312- $ old = array_map ([$ this , 'removeLineEnding ' ], $ this ->old );
313- $ new = array_map ([$ this , 'removeLineEnding ' ], $ this ->new );
314- } else {
315- $ old = $ this ->old ;
316- $ new = $ this ->new ;
317- }
318-
311+ $ old = $ this ->old ;
312+ $ new = $ this ->new ;
319313 $ this ->getGroupedOpcodesPre ($ old , $ new );
320314
321315 $ opcodes = $ this ->sequenceMatcher
@@ -341,14 +335,8 @@ public function getGroupedOpcodesGnu(): array
341335 return $ this ->groupedOpcodesGnu ;
342336 }
343337
344- if ($ this ->options ['ignoreLineEnding ' ]) {
345- $ old = array_map ([$ this , 'removeLineEnding ' ], $ this ->old );
346- $ new = array_map ([$ this , 'removeLineEnding ' ], $ this ->new );
347- } else {
348- $ old = $ this ->old ;
349- $ new = $ this ->new ;
350- }
351-
338+ $ old = $ this ->old ;
339+ $ new = $ this ->new ;
352340 $ this ->getGroupedOpcodesGnuPre ($ old , $ new );
353341
354342 $ opcodes = $ this ->sequenceMatcher
@@ -472,16 +460,6 @@ private function getGroupedOpcodesGnuPost(array &$opcodes): void
472460 $ this ->getGroupedOpcodesPost ($ opcodes );
473461 }
474462
475- /**
476- * Remove line ending characters at the end of the string.
477- *
478- * @param string $str the string
479- */
480- private function removeLineEnding (string $ str ): string
481- {
482- return rtrim ($ str , "\r\n" );
483- }
484-
485463 /**
486464 * Claim this class has settled down and we could calculate cached
487465 * properties by current properties.
0 commit comments