From 1f22f4a59ef8d79f53788ece6cf1dc59fb43a096 Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Mon, 14 Oct 2024 21:24:28 +0200 Subject: [PATCH] Rework handling of values that are not recognized This will remove the necesity to calculate the class name twice in immediate succession should the declared valuetype not be set. --- lib/Document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Document.php b/lib/Document.php index 757bddb6..29463059 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -186,8 +186,8 @@ public function createProperty(string $name, $value = null, ?array $parameters = // parameter need not be specified. However, if the property's // default value type is overridden by some other allowable value // type, then this parameter MUST be specified. - if (isset($parameters['VALUE'])) { - $class = $this->getClassNameForPropertyValue($parameters['VALUE']); + if (!$valueType) { + $valueType = $parameters['VALUE'] ?? null; } if ($valueType) {