Skip to content

Commit

Permalink
Fix generating routes
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrooo committed Jun 26, 2023
1 parent e89179b commit cca8af2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Ouzo/Core/Uri/UriGeneratorTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ public static function replaceTemplate(string $namesList, string $methodsList, s

private static function replace(string $template, string $pattern, ?string $replacement): string
{
if (Strings::isBlank($replacement)) {
$replacement = Strings::EMPTY_STRING;
}
$replacement ??= Strings::EMPTY_STRING;
return str_replace(["/*{{$pattern}}*/", "%{{$pattern}}"], $replacement, $template);
}

Expand Down

0 comments on commit cca8af2

Please sign in to comment.