From 9a9be466f776902f8c78620e02f919fd0271612c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 26 Apr 2024 13:49:38 +0200 Subject: [PATCH] Refactor replaceVariables function in services.php to use a more concise syntax --- bootstrap/helpers/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.php index 8e3c0337e..5b71a8b10 100644 --- a/bootstrap/helpers/services.php +++ b/bootstrap/helpers/services.php @@ -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)