From 85883c1e01b2e67e103e19e8f817f9d2e2ebcba9 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Tue, 24 Mar 2020 02:31:30 +0100 Subject: [PATCH] fix content resolving --- .../Symfony/Validator/Constraints/AssertChoiceTagValueNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/better-php-doc-parser/src/PhpDocNode/Symfony/Validator/Constraints/AssertChoiceTagValueNode.php b/packages/better-php-doc-parser/src/PhpDocNode/Symfony/Validator/Constraints/AssertChoiceTagValueNode.php index e69401ce3582..5f90216fafb6 100644 --- a/packages/better-php-doc-parser/src/PhpDocNode/Symfony/Validator/Constraints/AssertChoiceTagValueNode.php +++ b/packages/better-php-doc-parser/src/PhpDocNode/Symfony/Validator/Constraints/AssertChoiceTagValueNode.php @@ -110,7 +110,7 @@ private function createOriginalChoiceContent() private function resolveOriginalChoiceContent(string $annotationContent): ?string { - $matches = Strings::match($annotationContent, '#(\(choices=|\()(?.*?)(\)|,)#ms'); + $matches = Strings::match($annotationContent, '#(\(choices=|\()(?.*?(})?)(\)|})#ms'); return $matches['choice_content'] ?? null; }