Skip to content

Commit

Permalink
fix stan for PHP 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 15, 2022
1 parent e7455c7 commit f531f29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Reference/HasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function init(): void
$v = $this->{$fieldPropRefl->getName()};
$vDefault = \PHP_MAJOR_VERSION < 8
? $fieldPropRefl->getDeclaringClass()->getDefaultProperties()[$fieldPropRefl->getName()]
: $fieldPropRefl->getDefaultValue();
: (null ?? $fieldPropRefl->getDefaultValue()); // @phpstan-ignore-line for PHP 7.x
if ($v !== $vDefault) {
$fieldSeed[$fieldPropRefl->getName()] = $v;
}
Expand Down

0 comments on commit f531f29

Please sign in to comment.