@@ -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 | } |
@@ -92,21 +92,21 @@ |
||
92 | 92 | if ($config['graphiql']['authentication']['provider']['lexik_jwt']['enabled'] ?? false) { |
93 | 93 | $providerName = sprintf('security.user.provider.concrete.%s', $config['graphiql']['authentication']['provider']['lexik_jwt']['user_provider']); |
94 | 94 | $container->getDefinition(LexikJWTGraphiQLAuthenticator::class) |
95 | - ->setArgument(1, new Reference($providerName)); |
|
95 | + ->setArgument(1, new Reference($providerName)); |
|
96 | 96 | } else { |
97 | 97 | $container->removeDefinition(LexikJWTGraphiQLAuthenticator::class); |
98 | 98 | } |
99 | 99 | |
100 | 100 | //build the ID encoder manager with configured encoder |
101 | 101 | $container->getDefinition(IDEncoderManager::class) |
102 | - ->setPublic(true) |
|
103 | - ->replaceArgument(0, $container->getDefinition($config['id_encoder'])); |
|
102 | + ->setPublic(true) |
|
103 | + ->replaceArgument(0, $container->getDefinition($config['id_encoder'])); |
|
104 | 104 | |
105 | 105 | |
106 | 106 | //endpoint definition |
107 | 107 | $container->getDefinition(GraphQLEndpointController::class) |
108 | - ->addMethodCall('setErrorFormatter', [$container->getDefinition($config['error_handling']['formatter'])]) |
|
109 | - ->addMethodCall('setErrorHandler', [$container->getDefinition($config['error_handling']['handler'])]); |
|
108 | + ->addMethodCall('setErrorFormatter', [$container->getDefinition($config['error_handling']['formatter'])]) |
|
109 | + ->addMethodCall('setErrorHandler', [$container->getDefinition($config['error_handling']['handler'])]); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -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 |
@@ -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 | } |
@@ -41,11 +41,11 @@ |
||
41 | 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 | - ->setRoot($root) |
|
45 | - ->setResolveInfo($resolveInfo) |
|
46 | - ->setArgs($args) |
|
47 | - ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
48 | - ->build(); |
|
44 | + ->setRoot($root) |
|
45 | + ->setResolveInfo($resolveInfo) |
|
46 | + ->setArgs($args) |
|
47 | + ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
48 | + ->build(); |
|
49 | 49 | |
50 | 50 | |
51 | 51 | return $resolver($root, $args, $context, $resolveInfo); |
@@ -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) |