diff --git a/src/Differ.php b/src/Differ.php index 4960111e..f4b7723a 100644 --- a/src/Differ.php +++ b/src/Differ.php @@ -134,9 +134,6 @@ public function diff($from, $to, LongestCommonSubsequence $lcs = null) */ public function diffToArray($from, $to, LongestCommonSubsequence $lcs = null) { - preg_match_all('(\r\n|\r|\n)', $from, $fromMatches); - preg_match_all('(\r\n|\r|\n)', $to, $toMatches); - if (is_string($from)) { $from = preg_split('(\r\n|\r|\n)', $from); } @@ -178,14 +175,6 @@ public function diffToArray($from, $to, LongestCommonSubsequence $lcs = null) $common = $lcs->calculate(array_values($from), array_values($to)); $diff = array(); - if (isset($fromMatches[0]) && $toMatches[0] && - count($fromMatches[0]) === count($toMatches[0]) && - $fromMatches[0] !== $toMatches[0]) { - $diff[] = array( - '#Warning: Strings contain different line endings!', 0 - ); - } - foreach ($start as $token) { $diff[] = array($token, 0 /* OLD */); }