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 authored and phil-davis committed Oct 22, 2024
1 parent 2f24ce1 commit 4761ca2
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 @@ -206,8 +206,8 @@ public function createProperty($name, $value = null, ?array $parameters = null,
// 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 4761ca2

Please sign in to comment.