Skip to content

Commit

Permalink
mapping generator error prevention
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Jan 23, 2024
1 parent a620b32 commit 6c89cc2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public function execute(): array
);
}

foreach ($mappedSuperClass->{'unique-constraints'}->{'unique-constraint'} as $constraint) {
$uniqueConstraints = $mappedSuperClass
->{'unique-constraints'}
?->{'unique-constraint'};

foreach (($uniqueConstraints ?? []) as $constraint) {
$currentFields[] = new RequestedProperty(
$constraint->attributes()['name'],
'unique_constraint'
Expand Down

0 comments on commit 6c89cc2

Please sign in to comment.