Skip to content

Commit

Permalink
Merge cca8af2 into d573a35
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrooo committed Jun 26, 2023
2 parents d573a35 + cca8af2 commit 070c75e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Ouzo/Core/Uri/UriGeneratorTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Ouzo\Uri;

use Ouzo\Utilities\Arrays;
use Ouzo\Utilities\Strings;

class UriGeneratorTemplates
{
Expand All @@ -20,6 +21,7 @@ public static function replaceTemplate(string $namesList, string $methodsList, s

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

Expand Down Expand Up @@ -115,4 +117,4 @@ private static function checkParameterTemplate(string $param): string
TEMPLATE;
}
}
}

0 comments on commit 070c75e

Please sign in to comment.