Skip to content

Commit

Permalink
some small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Jan 26, 2025
1 parent cecf0cb commit 9e57928
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Utilities/TypeHintUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,15 @@ public static function buildSetterParameterDocHint(Version $version,
$hintTypes = self::buildBaseHintParts($version, $pt, true);


if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) {
$hintTypes[] = $pt->getFullyQualifiedClassName(true);
}

if ($pt->isPrimitiveContainer()) {
$vp = $pt->getProperties()->getProperty(PHPFHIR_VALUE_PROPERTY_NAME);
array_push(
$hintTypes,
$vp->getValueFHIRType()->getFullyQualifiedClassName(true),
$pt->getFullyQualifiedClassName(true),
);
} else if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) {
$hintTypes[] = $pt->getFullyQualifiedClassName(true);
}

if (!$ignoreCollection && $property->isCollection()) {
Expand Down Expand Up @@ -309,17 +307,15 @@ public static function buildSetterParameterHint(Version $version,
} else {
$hintTypes = self::buildBaseHintParts($version, $pt, false);

if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) {
$hintTypes[] = $pt->getClassName();
}

if ($pt->isPrimitiveContainer()) {
$vp = $pt->getProperties()->getProperty(PHPFHIR_VALUE_PROPERTY_NAME);
array_push(
$hintTypes,
$vp->getValueFHIRType()->getClassName(),
$pt->getClassName(),
);
} else if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) {
$hintTypes[] = $pt->getClassName();
}
}

Expand Down

0 comments on commit 9e57928

Please sign in to comment.