@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | public function register() |
24 | 24 | { |
25 | 25 | $this->container |
26 | - ->share(GraphQL::INCLUDE_DIRECTIVE, function () { |
|
26 | + ->share(GraphQL::INCLUDE_DIRECTIVE, function() { |
|
27 | 27 | return newDirective([ |
28 | 28 | 'name' => 'include', |
29 | 29 | 'description' => |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | }); |
45 | 45 | |
46 | 46 | $this->container |
47 | - ->share(GraphQL::SKIP_DIRECTIVE, function () { |
|
47 | + ->share(GraphQL::SKIP_DIRECTIVE, function() { |
|
48 | 48 | return newDirective([ |
49 | 49 | 'name' => 'skip', |
50 | 50 | 'description' => |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | }); |
66 | 66 | |
67 | 67 | $this->container |
68 | - ->share(GraphQL::DEPRECATED_DIRECTIVE, function () { |
|
68 | + ->share(GraphQL::DEPRECATED_DIRECTIVE, function() { |
|
69 | 69 | return newDirective([ |
70 | 70 | 'name' => 'deprecated', |
71 | 71 | 'description' => 'Marks an element of a GraphQL schema as no longer supported.', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | return $middleware; |
116 | 116 | } |
117 | 117 | |
118 | - return \array_filter($middleware, function (ResolverMiddlewareInterface $mw) use ($resolverMiddleware) { |
|
118 | + return \array_filter($middleware, function(ResolverMiddlewareInterface $mw) use ($resolverMiddleware) { |
|
119 | 119 | return \in_array(\get_class($mw), $resolverMiddleware, true); |
120 | 120 | }); |
121 | 121 | } |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | { |
130 | 130 | return \array_reduce( |
131 | 131 | $middleware, |
132 | - function (callable $resolveCallback, ResolverMiddlewareInterface $middleware) { |
|
133 | - return function ($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) use ( |
|
132 | + function(callable $resolveCallback, ResolverMiddlewareInterface $middleware) { |
|
133 | + return function($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) use ( |
|
134 | 134 | $resolveCallback, |
135 | 135 | $middleware |
136 | 136 | ) { |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function getResolveCallback(): ?callable |
32 | 32 | { |
33 | - return function ($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) { |
|
33 | + return function($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) { |
|
34 | 34 | return $this->resolve($rootValue, $arguments, $context, $info); |
35 | 35 | }; |
36 | 36 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function getResolveCallback(): ?callable |
13 | 13 | { |
14 | - return function (string $fieldName) { |
|
14 | + return function(string $fieldName) { |
|
15 | 15 | return $this->getResolver($fieldName); |
16 | 16 | }; |
17 | 17 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function getTypeResolver(): ?callable |
13 | 13 | { |
14 | - return function ($rootValue, $context = null, ?ResolveInfo $info = null) { |
|
14 | + return function($rootValue, $context = null, ?ResolveInfo $info = null) { |
|
15 | 15 | return $this->resolveType($rootValue, $context, $info); |
16 | 16 | }; |
17 | 17 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function getResolveCallback(): ?callable |
45 | 45 | { |
46 | - return function (string $fieldName) { |
|
46 | + return function(string $fieldName) { |
|
47 | 47 | $resolver = $this->getResolver($fieldName); |
48 | 48 | |
49 | 49 | return $resolver instanceof ResolverInterface |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | protected function enterFragmentDefinition(FragmentDefinitionNode $node): VisitorResult |
28 | 28 | { |
29 | - $this->validateFragementNode($node, function (FragmentDefinitionNode $node) { |
|
29 | + $this->validateFragementNode($node, function(FragmentDefinitionNode $node) { |
|
30 | 30 | return fragmentOnNonCompositeMessage((string)$node, (string)$node->getTypeCondition()); |
31 | 31 | }); |
32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | protected function enterInlineFragment(InlineFragmentNode $node): VisitorResult |
40 | 40 | { |
41 | - $this->validateFragementNode($node, function (InlineFragmentNode $node) { |
|
41 | + $this->validateFragementNode($node, function(InlineFragmentNode $node) { |
|
42 | 42 | return inlineFragmentOnNonCompositeMessage((string)$node->getTypeCondition()); |
43 | 43 | }); |
44 | 44 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | protected function enterDocument(DocumentNode $node): VisitorResult |
28 | 28 | { |
29 | - $this->operationCount = \count(\array_filter($node->getDefinitions(), function ($definition) { |
|
29 | + $this->operationCount = \count(\array_filter($node->getDefinitions(), function($definition) { |
|
30 | 30 | return $definition instanceof OperationDefinitionNode; |
31 | 31 | })); |
32 | 32 |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | public function getFragment(string $name): ?FragmentDefinitionNode |
169 | 169 | { |
170 | 170 | if (empty($this->fragments)) { |
171 | - $this->fragments = array_reduce($this->document->getDefinitions(), function ($fragments, $definition) { |
|
171 | + $this->fragments = array_reduce($this->document->getDefinitions(), function($fragments, $definition) { |
|
172 | 172 | if ($definition instanceof FragmentDefinitionNode) { |
173 | 173 | $fragments[$definition->getNameValue()] = $definition; |
174 | 174 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $usages = []; |
245 | 245 | $typeInfo = new TypeInfo($this->schema); |
246 | 246 | |
247 | - $enterCallback = function (NodeInterface $node) use (&$usages, $typeInfo): VisitorResult { |
|
247 | + $enterCallback = function(NodeInterface $node) use (&$usages, $typeInfo): VisitorResult { |
|
248 | 248 | if ($node instanceof VariableDefinitionNode) { |
249 | 249 | return new VisitorResult(null); |
250 | 250 | } |