Refactor services.php file to improve variable replacement logic

This commit is contained in:
Andras Bacsai
2024-04-29 12:04:32 +02:00
parent c36636bd2d
commit 11baa97ef6

View File

@@ -18,7 +18,7 @@ function collectRegex(string $name)
} }
function replaceVariables($variable) function replaceVariables($variable)
{ {
return $variable->replaceFirst('$', '')->replaceFirst('{', '')->replaceLast('}', ''); return $variable->before('}')->replaceFirst('$', '')->replaceFirst('{', '');
} }
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false) function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)