Skip to content

Commit

Permalink
Replace \ with $ for capturing group reference in TemplateGuesser (#596)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAmelung committed Apr 9, 2024
1 parent 2c5c9ef commit 607447e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Helper/TemplateGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function resolve(string $namespace, string $class, string $method): stri
$action = Strings::replace(
$action,
self::SMALL_LETTER_BIG_LETTER_REGEX,
'\\1_\\2'
'$1_$2'
);

$fullPath = '';
Expand Down Expand Up @@ -129,7 +129,7 @@ private function resolveController(string $class): string
$controller = Strings::replace(
$match['class_name_without_suffix'],
self::SMALL_LETTER_BIG_LETTER_REGEX,
'\\1_\\2'
'$1_$2'
);
return str_replace('\\', '/', $controller);
}
Expand Down

0 comments on commit 607447e

Please sign in to comment.