Skip to content

Commit

Permalink
Using nullsafe method call on non-nullable type ReflectionNamedType
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferror committed Jan 7, 2024
1 parent 370ecba commit 14f32b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Attribute/PropertyEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function toArray(): array
}

return array_merge(parent::toArray(), [
'type' => PropertyTypeTranslator::translate($enum->getBackingType()?->getName()),
'type' => PropertyTypeTranslator::translate($enum->getBackingType()->getName()),
'enum' => array_map(
static fn (ReflectionEnumBackedCase $case) => $case->getBackingValue(),
$enum->getCases()
Expand Down

0 comments on commit 14f32b7

Please sign in to comment.