Skip to content

Commit 3e919a1

Browse files
authored
Merge 20a95e4 into 8d25890
2 parents 8d25890 + 20a95e4 commit 3e919a1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Bridge/NelmioApiDoc/Parser/ApiPlatformParser.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,12 @@ private function getGroupsContext(ResourceMetadata $resourceMetadata, string $op
131131
$groupsContext = $isNormalization ? 'normalization_context' : 'denormalization_context';
132132
$itemOperationAttribute = $resourceMetadata->getItemOperationAttribute($operationName, $groupsContext, ['groups' => []], true)['groups'];
133133
$collectionOperationAttribute = $resourceMetadata->getCollectionOperationAttribute($operationName, $groupsContext, ['groups' => []], true)['groups'];
134-
$operation[$groupsContext]['groups'] = array_merge($itemOperationAttribute ?? [], $collectionOperationAttribute ?? []);
135134

136-
return $operation;
135+
return [
136+
$groupsContext => [
137+
'groups' => array_merge(isset($itemOperationAttribute) ? $itemOperationAttribute : [], isset($collectionOperationAttribute) ? $collectionOperationAttribute : []),
138+
],
139+
];
137140
}
138141

139142
/**

0 commit comments

Comments
 (0)