Refactor replaceVariables function in services.php to use a more concise syntax

This commit is contained in:
Andras Bacsai 2024-04-26 13:49:38 +02:00
parent bbad029aa1
commit 9a9be466f7

View File

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