From a546017c59387361560842968b9ee6e50752e335 Mon Sep 17 00:00:00 2001 From: Ronan Giron Date: Mon, 7 Jun 2021 22:03:49 +0200 Subject: [PATCH] Use constants to define encapsulation characters of functions --- src/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Config.php b/src/Config.php index e2b73a7..ec6607e 100644 --- a/src/Config.php +++ b/src/Config.php @@ -197,7 +197,7 @@ protected function treatValue(mixed &$value): void $matches = []; if (!preg_match_all( - '#{\s*(?:=|(?\w+)\s*:\s*)(?[^}]+)\s*}#', + '#' . static::ENCAPSULATION_START . '\s*(?:=|(?\w+)\s*:\s*)(?[^}]+)\s*' . static::ENCAPSULATION_END . '#', $value, $matches, PREG_OFFSET_CAPTURE | PREG_UNMATCHED_AS_NULL