Skip to content

Commit

Permalink
fix(metadata): property override when value is set
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed May 20, 2022
1 parent a4489f9 commit 8108f42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function create(string $resourceClass, string $property, array $options =

$wither = str_replace(['get', 'is'], 'with', $method);

if (method_exists($propertyMetadata, $wither) && null !== $legacyPropertyMetadata->{$method}()) {
if (method_exists($propertyMetadata, $wither) && null !== $legacyPropertyMetadata->{$method}() && null === $propertyMetadata->{$method}()) {
$propertyMetadata = $propertyMetadata->{$wither}($legacyPropertyMetadata->{$method}());
}
}
Expand Down

0 comments on commit 8108f42

Please sign in to comment.