@@ -314,14 +314,8 @@ public function getGroupedOpcodes(): array
314314 return $ this ->groupedOpcodes ;
315315 }
316316
317- if ($ this ->options ['ignoreLineEnding ' ]) {
318- $ old = array_map ([$ this , 'removeLineEnding ' ], $ this ->old );
319- $ new = array_map ([$ this , 'removeLineEnding ' ], $ this ->new );
320- } else {
321- $ old = $ this ->old ;
322- $ new = $ this ->new ;
323- }
324-
317+ $ old = $ this ->old ;
318+ $ new = $ this ->new ;
325319 $ this ->getGroupedOpcodesPre ($ old , $ new );
326320
327321 $ opcodes = $ this ->sequenceMatcher
@@ -346,14 +340,8 @@ public function getGroupedOpcodesGnu(): array
346340 return $ this ->groupedOpcodesGnu ;
347341 }
348342
349- if ($ this ->options ['ignoreLineEnding ' ]) {
350- $ old = array_map ([$ this , 'removeLineEnding ' ], $ this ->old );
351- $ new = array_map ([$ this , 'removeLineEnding ' ], $ this ->new );
352- } else {
353- $ old = $ this ->old ;
354- $ new = $ this ->new ;
355- }
356-
343+ $ old = $ this ->old ;
344+ $ new = $ this ->new ;
357345 $ this ->getGroupedOpcodesGnuPre ($ old , $ new );
358346
359347 $ opcodes = $ this ->sequenceMatcher
@@ -476,16 +464,6 @@ private function getGroupedOpcodesGnuPost(array &$opcodes): void
476464 $ this ->getGroupedOpcodesPost ($ opcodes );
477465 }
478466
479- /**
480- * Remove line ending characters at the end of the string.
481- *
482- * @param string $str the string
483- */
484- private function removeLineEnding (string $ str ): string
485- {
486- return rtrim ($ str , "\r\n" );
487- }
488-
489467 /**
490468 * Claim this class has settled down and we could calculate cached
491469 * properties by current properties.
0 commit comments