Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 10, 2024
1 parent 4136ed5 commit b2bb531
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/NodeNameResolver/Regex/RegexPatternDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ public function isRegexPattern(string $name): bool
$lastChar = $name[strlen($name) - 1];
if ($firstChar !== $lastChar) {
foreach (self::START_AND_END_DELIMITERS as $start => $end) {
if ($firstChar === $start && $lastChar === $end) {
return true;
if ($firstChar !== $start) {
continue;
}
if ($lastChar !== $end) {
continue;
}
return true;
}

return false;
Expand Down

0 comments on commit b2bb531

Please sign in to comment.