Skip to content

Commit

Permalink
don't try to construct abstract parents
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Dec 21, 2024
1 parent bc18d5a commit 0535136
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/versions/types/methods/constructors/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
public function __construct(null|array<?php if ($type->isValueContainer()) : ?>|<?php echo TypeHintUtils::propertySetterTypeHint($version, $valueProperty, false); endif; ?> $data = null)
{
if (null === $data || [] === $data) {
<?php if ($type->hasParent()) : ?>
<?php if ($type->hasConcreteParent()) : ?>
parent::__construct(null);
<?php endif; ?>
return;
}
<?php if ($type->isValueContainer()) : ?>
if (!is_array($data)) {
<?php if ($type->hasParent()): ?>
<?php if ($type->hasConcreteParent()) : ?>
parent::__construct(null);
<?php endif; ?>
$this->setValue($data);
Expand Down

0 comments on commit 0535136

Please sign in to comment.