@@ -129,7 +129,7 @@ |
||
| 129 | 129 | { |
| 130 | 130 | return arraySome( |
| 131 | 131 | specifiedDirectives(), |
| 132 | - function (DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 132 | + function(DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 133 | 133 | return $specifiedDirective->getName() === $directive->getName(); |
| 134 | 134 | } |
| 135 | 135 | ); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | if ($code === 92) { |
| 54 | 54 | // \ |
| 55 | 55 | $value .= sliceString($body, $chunkStart, $pos + 1); |
| 56 | - $code = charCodeAt($body, $pos); |
|
| 56 | + $code = charCodeAt($body, $pos); |
|
| 57 | 57 | |
| 58 | 58 | switch ($code) { |
| 59 | 59 | case 34: |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | function arraySome(array $array, callable $fn) |
| 25 | 25 | { |
| 26 | - return array_reduce($array, function ($result, $value) use ($fn) { |
|
| 26 | + return array_reduce($array, function($result, $value) use ($fn) { |
|
| 27 | 27 | return $result || $fn($value); |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function keyMap(array $array, callable $keyFn): array |
| 37 | 37 | { |
| 38 | - return array_reduce($array, function ($map, $item) use ($keyFn) { |
|
| 38 | + return array_reduce($array, function($map, $item) use ($keyFn) { |
|
| 39 | 39 | $map[$keyFn($item)] = $item; |
| 40 | 40 | return $map; |
| 41 | 41 | }, []); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | function keyValMap(array $array, callable $keyFn, callable $valFn): array |
| 51 | 51 | { |
| 52 | - return array_reduce($array, function ($map, $item) use ($keyFn, $valFn) { |
|
| 52 | + return array_reduce($array, function($map, $item) use ($keyFn, $valFn) { |
|
| 53 | 53 | $map[$keyFn($item)] = $valFn($item); |
| 54 | 54 | return $map; |
| 55 | 55 | }, []); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $coercedValues; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) { |
|
| 38 | + $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) { |
|
| 39 | 39 | return $value->getNameValue(); |
| 40 | 40 | }); |
| 41 | 41 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | function getDirectiveValues(DirectiveInterface $directive, NodeInterface $node, array $variableValues = []): ?array |
| 106 | 106 | { |
| 107 | 107 | $directiveNode = $node->hasDirectives() |
| 108 | - ? find($node->getDirectives(), function (NamedTypeNode $value) use ($directive) { |
|
| 108 | + ? find($node->getDirectives(), function(NamedTypeNode $value) use ($directive) { |
|
| 109 | 109 | return $value->getNameValue() === $directive->getName(); |
| 110 | 110 | }) : null; |
| 111 | 111 | |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | $coercedObject = []; |
| 102 | 102 | |
| 103 | 103 | /** @var ObjectFieldNode[] $fieldNodes */ |
| 104 | - $fieldNodes = keyMap($node->getFields(), function (FieldNode $value) { |
|
| 104 | + $fieldNodes = keyMap($node->getFields(), function(FieldNode $value) { |
|
| 105 | 105 | return $value->getNameValue(); |
| 106 | 106 | }); |
| 107 | 107 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function getMultiple($keys, $default = null) |
| 61 | 61 | { |
| 62 | - return array_filter($this->cache, function ($key) use ($keys) { |
|
| 62 | + return array_filter($this->cache, function($key) use ($keys) { |
|
| 63 | 63 | return \in_array($key, $keys, true); |
| 64 | 64 | }, ARRAY_FILTER_USE_KEY); |
| 65 | 65 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | return arraySome( |
| 74 | 74 | specifiedScalarTypes(), |
| 75 | - function (ScalarType $specifiedScalarType) use ($type) { |
|
| 75 | + function(ScalarType $specifiedScalarType) use ($type) { |
|
| 76 | 76 | /** @noinspection PhpUndefinedMethodInspection */ |
| 77 | 77 | return $type->getName() === $specifiedScalarType->getName(); |
| 78 | 78 | } |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function register() |
| 31 | 31 | { |
| 32 | - $this->container->add(NodeBuilderInterface::class, function () { |
|
| 32 | + $this->container->add(NodeBuilderInterface::class, function() { |
|
| 33 | 33 | return new NodeBuilder(SupportedBuilders::get()); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | 36 | $this->container->add(ParserInterface::class, Parser::class, true/* $shared */) |
| 37 | 37 | ->withArgument(NodeBuilderInterface::class); |
| 38 | 38 | |
| 39 | - $this->container->add(LexerInterface::class, function () { |
|
| 39 | + $this->container->add(LexerInterface::class, function() { |
|
| 40 | 40 | return new Lexer(SupportedReaders::get()); |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function register() |
| 29 | 29 | { |
| 30 | - $this->container->add(GraphQL::INCLUDE_DIRECTIVE, function () { |
|
| 30 | + $this->container->add(GraphQL::INCLUDE_DIRECTIVE, function() { |
|
| 31 | 31 | return GraphQLDirective([ |
| 32 | 32 | 'name' => 'include', |
| 33 | 33 | 'description' => |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | ]); |
| 48 | 48 | }, true/* $shared */); |
| 49 | 49 | |
| 50 | - $this->container->add(GraphQL::SKIP_DIRECTIVE, function () { |
|
| 50 | + $this->container->add(GraphQL::SKIP_DIRECTIVE, function() { |
|
| 51 | 51 | return GraphQLDirective([ |
| 52 | 52 | 'name' => 'skip', |
| 53 | 53 | 'description' => |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | ]); |
| 68 | 68 | }, true/* $shared */); |
| 69 | 69 | |
| 70 | - $this->container->add(GraphQL::DEPRECATED_DIRECTIVE, function () { |
|
| 70 | + $this->container->add(GraphQL::DEPRECATED_DIRECTIVE, function() { |
|
| 71 | 71 | return GraphQLDirective([ |
| 72 | 72 | 'name' => 'deprecated', |
| 73 | 73 | 'description' => 'Marks an element of a GraphQL schema as no longer supported.', |