Skip to content

Commit

Permalink
Merge c647820 into d573a35
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrooo authored Jun 26, 2023
2 parents d573a35 + c647820 commit 391ada8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,9 @@ 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;
}
return str_replace(["/*{{$pattern}}*/", "%{{$pattern}}"], $replacement, $template);
}

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

0 comments on commit 391ada8

Please sign in to comment.