@@ -183,7 +183,7 @@ |
||
183 | 183 | |
184 | 184 | $result->setErrorFormatter([$formatter, 'format']); |
185 | 185 | $result->setErrorsHandler( |
186 | - function ($errors) use ($handler, $formatter) { |
|
186 | + function($errors) use ($handler, $formatter) { |
|
187 | 187 | return $handler->handle($errors, $formatter, $this->getDebugMode()); |
188 | 188 | } |
189 | 189 | ); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $resolver->setDefault('alternative_id', null); |
85 | 85 | $resolver->setNormalizer( |
86 | 86 | 'alternative_id', |
87 | - function (Options $options, $value) { |
|
87 | + function(Options $options, $value) { |
|
88 | 88 | if ($value && !$options->offsetGet('class')) { |
89 | 89 | throw new InvalidArgumentException('Can\'t set the option "alternative_id" without define a valid "class"'); |
90 | 90 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $container->setParameter('graphql.namespaces', $config['namespaces'] ?? []); |
49 | 49 | $container->setParameter('graphql.cors_config', $config['cors'] ?? []); |
50 | 50 | $container->setParameter('graphql.graphiql', $config['graphiql'] ?? []); |
51 | - $container->setParameter('graphql.graphiql_auth_jwt', $config['graphiql']['authentication']['provider']['jwt'] ?? []);//DEPRECATED |
|
51 | + $container->setParameter('graphql.graphiql_auth_jwt', $config['graphiql']['authentication']['provider']['jwt'] ?? []); //DEPRECATED |
|
52 | 52 | $container->setParameter('graphql.graphiql_auth_lexik_jwt', $config['graphiql']['authentication']['provider']['lexik_jwt'] ?? []); |
53 | 53 | $container->setParameter('graphql.security.validation_rules', $config['security']['validation_rules'] ?? []); |
54 | 54 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | if ($config['graphiql']['authentication']['provider']['lexik_jwt']['enabled'] ?? false) { |
109 | 109 | $providerName = sprintf('security.user.provider.concrete.%s', $config['graphiql']['authentication']['provider']['lexik_jwt']['user_provider']); |
110 | 110 | $container->getDefinition(LexikJWTGraphiQLAuthenticator::class) |
111 | - ->setArgument(1, new Reference($providerName)); |
|
111 | + ->setArgument(1, new Reference($providerName)); |
|
112 | 112 | } else { |
113 | 113 | $container->removeDefinition(LexikJWTGraphiQLAuthenticator::class); |
114 | 114 | } |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | |
118 | 118 | //build the ID encoder manager with configured encoder |
119 | 119 | $container->getDefinition(IDEncoderManager::class) |
120 | - ->setPublic(true) |
|
121 | - ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
120 | + ->setPublic(true) |
|
121 | + ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
122 | 122 | |
123 | 123 | |
124 | 124 | //endpoint definition |
125 | 125 | $container->getDefinition(GraphQLEndpointController::class) |
126 | - ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
127 | - ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
126 | + ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
127 | + ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
128 | 128 | |
129 | 129 | $bundles = $container->getParameter('kernel.bundles'); |
130 | 130 | if (isset($bundles['MercureBundle']) && $config['subscriptions']) { |
@@ -133,19 +133,19 @@ discard block |
||
133 | 133 | $mercurePublisherReference = new Reference(sprintf('mercure.hub.%s.publisher', $mercureHub)); |
134 | 134 | |
135 | 135 | $container->getDefinition(SubscriptionManager::class) |
136 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
137 | - ->addArgument(new Parameter('kernel.secret')); |
|
136 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
137 | + ->addArgument(new Parameter('kernel.secret')); |
|
138 | 138 | |
139 | 139 | $container->getDefinition(SubscriptionsController::class) |
140 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
141 | - ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
140 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
141 | + ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
142 | 142 | |
143 | 143 | $container->getDefinition(SubscriptionsHeartbeatController::class) |
144 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
145 | - ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
144 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
145 | + ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
146 | 146 | |
147 | 147 | $container->getDefinition(SubscriptionConsumerCommand::class) |
148 | - ->addArgument($mercurePublisherReference); |
|
148 | + ->addArgument($mercurePublisherReference); |
|
149 | 149 | |
150 | 150 | $container->getDefinition(GraphQLEndpointController::class)->addMethodCall('setPublisher', [$mercurePublisherReference]); |
151 | 151 | } else { |
@@ -78,8 +78,8 @@ |
||
78 | 78 | $repo = $this->registry->getRepository($class); |
79 | 79 | $qb = $repo->createQueryBuilder('o', 'o.id'); |
80 | 80 | $entities = $qb->where($qb->expr()->in('o.id', array_values($ids))) |
81 | - ->getQuery() |
|
82 | - ->getResult(); |
|
81 | + ->getQuery() |
|
82 | + ->getResult(); |
|
83 | 83 | foreach ($entities as $entity) { |
84 | 84 | if ($entity instanceof NodeInterface) { |
85 | 85 | self::$deferred[$class][$entity->getId()] = $entity; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct(string $endpoint, array $registeredEndpoints) |
19 | 19 | { |
20 | - $message = sprintf( |
|
20 | + $message = sprintf( |
|
21 | 21 | '"%s" is not a valid configured endpoint, use one of the following endpoints: [%s]', |
22 | 22 | $endpoint, |
23 | 23 | implode($registeredEndpoints, ',') |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | $event->setValue( |
60 | 60 | new Deferred( |
61 | - function () use ($value) { |
|
61 | + function() use ($value) { |
|
62 | 62 | $this->deferredBuffer->loadBuffer(); |
63 | 63 | |
64 | 64 | return $this->deferredBuffer->getLoadedEntity($value); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * @inheritDoc |
66 | 66 | */ |
67 | - public function resolve(ExecutableDefinitionInterface $executableDefinition,ObjectDefinitionInterface $node, Endpoint $endpoint): array |
|
67 | + public function resolve(ExecutableDefinitionInterface $executableDefinition, ObjectDefinitionInterface $node, Endpoint $endpoint): array |
|
68 | 68 | { |
69 | 69 | $class = $node->getClass(); |
70 | 70 | $filters = []; |
@@ -70,10 +70,10 @@ |
||
70 | 70 | $paramName = sprintf('%s_ids_%s', $column, mt_rand()); |
71 | 71 | if ($condition->getOp() === NodeComparisonOperatorType::IN) { |
72 | 72 | $qb->andWhere(sprintf(':%s MEMBER OF %s.%s', $paramName, $alias, $column)) |
73 | - ->setParameter($paramName, $ids); |
|
73 | + ->setParameter($paramName, $ids); |
|
74 | 74 | } else { |
75 | 75 | $qb->andWhere(sprintf(':%s NOT MEMBER OF %s.%s', $paramName, $alias, $column)) |
76 | - ->setParameter($paramName, $ids); |
|
76 | + ->setParameter($paramName, $ids); |
|
77 | 77 | } |
78 | 78 | break; |
79 | 79 | } |
@@ -32,13 +32,13 @@ |
||
32 | 32 | [ |
33 | 33 | 'name' => $definition->getName(), |
34 | 34 | 'description' => $definition->getDescription(), |
35 | - 'fields' => function () use ($definition) { |
|
35 | + 'fields' => function() use ($definition) { |
|
36 | 36 | return GraphQLBuilder::resolveFields($definition); |
37 | 37 | }, |
38 | - 'interfaces' => function () use ($definition) { |
|
38 | + 'interfaces' => function() use ($definition) { |
|
39 | 39 | return $this->resolveInterfaces($definition); |
40 | 40 | }, |
41 | - 'resolveField' => function ($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($definition) { |
|
41 | + 'resolveField' => function($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($definition) { |
|
42 | 42 | $resolver = new ObjectFieldResolver($this->container); |
43 | 43 | $context = ContextBuilder::create($context->getEndpoint()) |
44 | 44 | ->setRoot($root) |
@@ -52,12 +52,12 @@ |
||
52 | 52 | 'resolveField' => function ($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($definition) { |
53 | 53 | $resolver = new ObjectFieldResolver($this->container); |
54 | 54 | $context = ContextBuilder::create($context->getEndpoint()) |
55 | - ->setRoot($root) |
|
56 | - ->setResolveInfo($resolveInfo) |
|
57 | - ->setArgs($args) |
|
58 | - ->setMetas($context->getMetas()) |
|
59 | - ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | - ->build(); |
|
55 | + ->setRoot($root) |
|
56 | + ->setResolveInfo($resolveInfo) |
|
57 | + ->setArgs($args) |
|
58 | + ->setMetas($context->getMetas()) |
|
59 | + ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | + ->build(); |
|
61 | 61 | |
62 | 62 | |
63 | 63 | return $resolver($root, $args, $context, $resolveInfo); |