Skip to content

Commit

Permalink
ensuring all local fields are xml serialized (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone authored Apr 30, 2024
1 parent 0397c4b commit f83de21
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion template/types/serialization/xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
);
} else {
// everything else shares a common header
// header is always output as it is what creates the simplexml instance
echo require_with(
PHPFHIR_TEMPLATE_TYPES_SERIALIZATION_DIR . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'serialize' . DIRECTORY_SEPARATOR . 'header.php',
[
Expand Down
2 changes: 1 addition & 1 deletion template/types/serialization/xml/serialize/body.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'property' => $property,
]
);
} elseif (null === $parentType) {
} elseif (0 < count($localProperties)) {
echo require_with(
__DIR__ . DIRECTORY_SEPARATOR . 'body_untyped.php',
[
Expand Down
2 changes: 1 addition & 1 deletion template/types/serialization/xml/serialize/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* @param null|\DOMElement $element
* @param null|int|\<?php echo ('' === $namespace ? '' : "{$namespace}\\") . PHPFHIR_INTERFACE_XML_SERIALIZALE_CONFIG; ?> $config XML serialization config. Supports an integer value interpreted as libxml opts for backwards compatibility.
* @return \DOMElement<?php if ($typeKind !== TypeKind::PRIMITIVE) : ?>
* @return \DOMElement<?php if ($typeKind !== TypeKind::PRIMITIVE || $type->hasParent()) : ?>

* @throws \DOMException<?php endif; ?>

Expand Down

0 comments on commit f83de21

Please sign in to comment.