Skip to content

Commit

Permalink
Merge 3c0e29a into 11fa1e7
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Sep 6, 2021
2 parents 11fa1e7 + 3c0e29a commit 44c76e8
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -35,14 +35,15 @@
use Psr\Log\NullLogger;

/**
* Creates a resource metadata from {@see Resource} annotations.
* Creates a resource metadata from {@see ApiResource} annotations.
*
* @author Antoine Bluchet <soyuka@gmail.com>
* @experimental
*/
final class AttributesResourceMetadataCollectionFactory implements ResourceMetadataCollectionFactoryInterface
{
use DeprecationMetadataTrait;

private $defaults;
private $decorated;
private $logger;
Expand Down Expand Up @@ -216,7 +217,7 @@ private function getOperationWithDefaults(ApiResource $resource, $operation): ar
];
}

private function getResourceWithDefaults(string $resourceClass, string $shortName, ApiResource $resource)
private function getResourceWithDefaults(string $resourceClass, string $shortName, ApiResource $resource): ApiResource
{
$resource = $resource
->withShortName($shortName)
Expand Down Expand Up @@ -262,7 +263,7 @@ private function hasSameOperation(ApiResource $resource, string $operationClass,
return false;
}

private function addDefaultGraphQlOperations(ApiResource $resource)
private function addDefaultGraphQlOperations(ApiResource $resource): ApiResource
{
$graphQlOperations = [];
foreach ([new QueryCollection(), new Query(), (new Mutation())->withName('update'), (new Mutation())->withName('delete'), (new Mutation())->withName('create')] as $i => $operation) {
Expand Down

0 comments on commit 44c76e8

Please sign in to comment.