Skip to content

Commit cca75c8

Browse files
authored
Merge b18cb7c into 42e6b08
2 parents 42e6b08 + b18cb7c commit cca75c8

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(isset($itemOperationAttribute) ? $itemOperationAttribute : [], isset($collectionOperationAttribute) ? $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)