Skip to content

Commit

Permalink
Rework handling of values that are not recognized
Browse files Browse the repository at this point in the history
This will remove the necesity to calculate the class name twice in
immediate succession should the declared valuetype not be set.
  • Loading branch information
heiglandreas committed Oct 14, 2024
1 parent f7cef9c commit 1f22f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1f22f4a

Please sign in to comment.