Skip to content

Commit

Permalink
this is gonna be neat.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Jan 7, 2025
1 parent ca2b376 commit 3e5cc08
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions template/versions/types/methods/constructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function __construct(<?php echo TypeHintUtils::typeSetterTypeHint($versio
continue;
}
?>
* @param null|<?php echo TypeHintUtils::propertySetterTypeHint($version, $property, true); ?> $<?php echo $property->getName(); ?>
* @param <?php echo TypeHintUtils::propertySetterTypeHint($version, $property, true); ?> $<?php echo $property->getName(); ?>

<?php endforeach; ?> */
public function __construct(null|array $data = null,
Expand Down Expand Up @@ -139,8 +139,18 @@ public function __construct(null|array $data = null,
<?php else : ?>
/**
* <?php echo $typeClassName; ?> Constructor
* @param null|array<?php if ($type->isValueContainer()) : ?>|<?php echo TypeHintUtils::propertySetterTypeHint($version, $valueProperty, false); endif; ?> $data
*/
* @param null|array $data<?php if ($type->isValueContainer()) : ?>

* @param <?php echo TypeHintUtils::propertySetterTypeHint($version, $valueProperty, true); ?> $value = null<?php endif; ?>
<?php foreach($type->getAllPropertiesIndexedIterator() as $property) :
$pt = $property->getValueFHIRType();
if ($type->isValueContainer() && $property->isValueProperty()) {
continue;
}
?>
* @param <?php echo TypeHintUtils::propertySetterTypeHint($version, $property, true); ?> $<?php echo $property->getName(); ?>

<?php endforeach; ?> */
public function __construct(null|array<?php if ($type->isValueContainer()) : ?>|<?php echo TypeHintUtils::propertySetterTypeHint($version, $valueProperty, false); endif; ?> $data = null)
{
if (null === $data || [] === $data) {
Expand Down

0 comments on commit 3e5cc08

Please sign in to comment.