Skip to content

Commit

Permalink
[CodingStyle] Skip new line /\r\n|\r|\n/i on ConsistentPregDelimiterR…
Browse files Browse the repository at this point in the history
…ector (#3241)
  • Loading branch information
samsonasik committed Dec 22, 2022
1 parent 70fea54 commit 3c168f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ class SkipNewLine
$content = 'some texte';
$parts = preg_split("/(\r\n|\n|\r){2}/", $content);
}

public function run2()
{
$content = 'some texte';
$parts = preg_split("/\r\n|\r|\n/i", $content);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ private function hasNewLineWithUnicodeModifier(string $string): bool
return false;
}

return StringUtils::isMatch($matchInnerUnionRegex['content'], self::NEW_LINE_REGEX);
if (StringUtils::isMatch($matchInnerUnionRegex['content'], self::NEW_LINE_REGEX)) {
return true;
}

return isset($string[0]) && $matchInnerUnionRegex['content'] === $string[0];
}

private function hasEscapedQuote(String_ $string): bool
Expand Down

0 comments on commit 3c168f0

Please sign in to comment.