From 7c359e8420fdd907e16b6841b733e9aaa99d1f53 Mon Sep 17 00:00:00 2001 From: Dmytro Klyman Date: Wed, 8 Nov 2023 12:13:41 +0100 Subject: [PATCH] SDK-5412: Extend class constant modifier --- .../ClassModifier/ClassConstant/ClassConstantModifier.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Builder/ClassModifier/ClassConstant/ClassConstantModifier.php b/src/Builder/ClassModifier/ClassConstant/ClassConstantModifier.php index 1ed7f73e..03a09efb 100644 --- a/src/Builder/ClassModifier/ClassConstant/ClassConstantModifier.php +++ b/src/Builder/ClassModifier/ClassConstant/ClassConstantModifier.php @@ -73,6 +73,14 @@ public function setConstant( if ($isLiteral) { $value = $this->parseSingleValue((string)$value); + } else if (is_array($value)) { + foreach ($value as $idx => $val) { + if (!is_string($val) || strpos($val, '::') === false) { + continue; + } + + $value[$idx] = $this->parseSingleValue($val); + } } $visitors = [