From 9e579286aa612ce5c0fe844b10047b0d9e68457c Mon Sep 17 00:00:00 2001 From: Daniel Carbone Date: Sat, 25 Jan 2025 19:05:58 -0600 Subject: [PATCH] some small cleanup --- src/Utilities/TypeHintUtils.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Utilities/TypeHintUtils.php b/src/Utilities/TypeHintUtils.php index 05f4d2da..05d65fce 100644 --- a/src/Utilities/TypeHintUtils.php +++ b/src/Utilities/TypeHintUtils.php @@ -261,10 +261,6 @@ 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( @@ -272,6 +268,8 @@ public static function buildSetterParameterDocHint(Version $version, $vp->getValueFHIRType()->getFullyQualifiedClassName(true), $pt->getFullyQualifiedClassName(true), ); + } else if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) { + $hintTypes[] = $pt->getFullyQualifiedClassName(true); } if (!$ignoreCollection && $property->isCollection()) { @@ -309,10 +307,6 @@ 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( @@ -320,6 +314,8 @@ public static function buildSetterParameterHint(Version $version, $vp->getValueFHIRType()->getClassName(), $pt->getClassName(), ); + } else if ($property->isValueProperty() || $pt->isPrimitiveOrListType()) { + $hintTypes[] = $pt->getClassName(); } }