diff --git a/src/Definition/Type.php b/src/Definition/Type.php index f68c6a61..6cb15b30 100644 --- a/src/Definition/Type.php +++ b/src/Definition/Type.php @@ -726,7 +726,7 @@ public function getDirectlyImplementedInterfaces(): array } if ($this->isContainedType()) { $interfaces[] = PHPFHIR_INTERFACE_CONTAINED_TYPE; - } else if ($this->getKind() !== TypeKind::PRIMITIVE) { + } else { $interfaces[] = PHPFHIR_INTERFACE_TYPE; } } elseif ($this->isContainedType() && !$parentType->isContainedType()) { @@ -749,10 +749,7 @@ public function getDirectlyUsedTraits(): array } $traits[] = PHPFHIR_TRAIT_VALIDATION_ASSERTIONS; $traits[] = PHPFHIR_TRAIT_CHANGE_TRACKING; - - if ($this->getKind() !== TypeKind::PRIMITIVE) { - $traits[] = PHPFHIR_TRAIT_XMLNS; - } + $traits[] = PHPFHIR_TRAIT_XMLNS; } return $traits; diff --git a/template/interfaces/phpfhir_type.php b/template/interfaces/phpfhir_type.php index cdecf952..359dde4f 100644 --- a/template/interfaces/phpfhir_type.php +++ b/template/interfaces/phpfhir_type.php @@ -42,11 +42,6 @@ */ interface extends \JsonSerializable { - /** - * @param array|null $data - */ - public function __construct(?array $data = null); - /** * Returns the FHIR name represented by this Type * @return string diff --git a/template/types/serialization/json/default.php b/template/types/serialization/json/default.php index 9b23cfd8..2d42095e 100644 --- a/template/types/serialization/json/default.php +++ b/template/types/serialization/json/default.php @@ -26,7 +26,7 @@ /** * @return \stdClass */ - public function jsonSerialize() + public function jsonSerialize(): \stdClass { getParentType()) : ?> $out = parent::jsonSerialize(); diff --git a/template/types/serialization/json/list.php b/template/types/serialization/json/list.php deleted file mode 100644 index 18ad5585..00000000 --- a/template/types/serialization/json/list.php +++ /dev/null @@ -1,27 +0,0 @@ - - /** - * @return null|string - */ - public function jsonSerialize() - { - return $this->getValue(); - } -getPrimitiveType(), true, false); ?> */ - public function jsonSerialize() + public function jsonSerialize(): getPrimitiveType(), true, false); ?> { getFHIRName(), 'unsigned')) : ?> return intval($this->getValue(), 10); diff --git a/template/types/serialization/json/resource_container.php b/template/types/serialization/json/resource_container.php index a963dd87..e8f9a000 100644 --- a/template/types/serialization/json/resource_container.php +++ b/template/types/serialization/json/resource_container.php @@ -20,9 +20,9 @@ ob_start(); ?> /** - * @return object|null + * @return null|object */ - public function jsonSerialize() + public function jsonSerialize(): null|object { if (null !== ($v = $this->getgetName()); ?>())) {