Skip to content

Commit eaee288

Browse files
loic425diimpp
andcommitted
Apply suggestions from code review
Co-authored-by: Dmitri Perunov <[email protected]>
1 parent f1545bf commit eaee288

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Component/src/Metadata/Resource/Factory/AttributesResourceMetadataCollectionFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private function buildResourceOperations(array $attributes, string $resourceClas
7676

7777
/** @var Operation $operation */
7878
foreach ($resource->getOperations() ?? new Operations() as $operation) {
79-
[$key, $operation] = $this->getOperationWithDefaults($this->operationRouteNameFactory, $this->resourceRegistry, $resources[$index], $operation);
79+
[$key, $operation] = $this->getOperationWithDefaults($operation, $resources[$index], $this->operationRouteNameFactory, $this->resourceRegistry);
8080
$operations[$key] = $operation;
8181
}
8282

@@ -106,7 +106,7 @@ private function buildResourceOperations(array $attributes, string $resourceClas
106106
/** @var Operation $operationAttribute */
107107
$operationAttribute = $attribute->newInstance();
108108

109-
[$key, $operation] = $this->getOperationWithDefaults($this->operationRouteNameFactory, $this->resourceRegistry, $resources[$index], $operationAttribute);
109+
[$key, $operation] = $this->getOperationWithDefaults($operationAttribute, $resources[$index], $this->operationRouteNameFactory, $this->resourceRegistry);
110110

111111
$operations = $resources[$index]->getOperations() ?? new Operations();
112112

src/Component/src/Metadata/Resource/Factory/OperationDefaultsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ private function getResourceWithDefaults(
4949
}
5050

5151
private function getOperationWithDefaults(
52+
Operation $operation,
53+
ResourceMetadata $resource,
5254
OperationRouteNameFactory $operationRouteNameFactory,
5355
RegistryInterface $resourceRegistry,
54-
ResourceMetadata $resource,
55-
Operation $operation,
5656
): array {
5757
$resourceConfiguration = $resourceRegistry->get($resource->getAlias() ?? '');
5858

0 commit comments

Comments
 (0)