@@ -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: |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function getValuesAsArray(): array |
| 34 | 34 | { |
| 35 | - return array_map(function (SerializationInterface $node) { |
|
| 35 | + return array_map(function(SerializationInterface $node) { |
|
| 36 | 36 | return $node->toArray(); |
| 37 | 37 | }, $this->values); |
| 38 | 38 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getSelectionsAsArray(): array |
| 35 | 35 | { |
| 36 | - return array_map(function (SerializationInterface $node) { |
|
| 36 | + return array_map(function(SerializationInterface $node) { |
|
| 37 | 37 | return $node->toArray(); |
| 38 | 38 | }, $this->selections); |
| 39 | 39 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getDefinitionsAsArray(): array |
| 35 | 35 | { |
| 36 | - return array_map(function (SerializationInterface $node) { |
|
| 36 | + return array_map(function(SerializationInterface $node) { |
|
| 37 | 37 | return $node->toArray(); |
| 38 | 38 | }, $this->definitions); |
| 39 | 39 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function getLocationsAsArray(): array |
| 41 | 41 | { |
| 42 | - return array_map(function (SerializationInterface $node) { |
|
| 42 | + return array_map(function(SerializationInterface $node) { |
|
| 43 | 43 | return $node->toArray(); |
| 44 | 44 | }, $this->locations); |
| 45 | 45 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | ) |
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | - $this->_possibleTypeMap = array_reduce($possibleTypes, function (array $map, TypeInterface $type) { |
|
| 167 | + $this->_possibleTypeMap = array_reduce($possibleTypes, function(array $map, TypeInterface $type) { |
|
| 168 | 168 | $map[$type->getName()] = true; |
| 169 | 169 | return $map; |
| 170 | 170 | }); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if ($type instanceof ObjectType || $type instanceof InterfaceType) { |
| 377 | 377 | foreach ($type->getFields() as $field) { |
| 378 | 378 | if ($field->hasArguments()) { |
| 379 | - $fieldArgTypes = array_map(function (Argument $argument) { |
|
| 379 | + $fieldArgTypes = array_map(function(Argument $argument) { |
|
| 380 | 380 | return $argument->getType(); |
| 381 | 381 | }, $field->getArguments()); |
| 382 | 382 | |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | return $map; |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | - return array_reduce($directive->getArguments(), function ($map, Argument $argument) { |
|
| 410 | + return array_reduce($directive->getArguments(), function($map, Argument $argument) { |
|
| 411 | 411 | return typeMapReducer($map, $argument->getType()); |
| 412 | 412 | }, $map); |
| 413 | 413 | } |
@@ -78,27 +78,27 @@ |
||
| 78 | 78 | |
| 79 | 79 | $this->definitionBuilder->setTypeDefinitionMap($nodeMap); |
| 80 | 80 | |
| 81 | - $types = array_map(function (TypeDefinitionNodeInterface $definition) { |
|
| 81 | + $types = array_map(function(TypeDefinitionNodeInterface $definition) { |
|
| 82 | 82 | return $this->definitionBuilder->buildType($definition); |
| 83 | 83 | }, $typeDefinitions); |
| 84 | 84 | |
| 85 | - $directives = array_map(function (DirectiveDefinitionNode $definition) { |
|
| 85 | + $directives = array_map(function(DirectiveDefinitionNode $definition) { |
|
| 86 | 86 | return $this->definitionBuilder->buildDirective($definition); |
| 87 | 87 | }, $directiveDefinitions); |
| 88 | 88 | |
| 89 | - if (!arraySome($directives, function (DirectiveInterface $directive) { |
|
| 89 | + if (!arraySome($directives, function(DirectiveInterface $directive) { |
|
| 90 | 90 | return $directive->getName() === 'skip'; |
| 91 | 91 | })) { |
| 92 | 92 | $directives[] = GraphQLSkipDirective(); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - if (!arraySome($directives, function (DirectiveInterface $directive) { |
|
| 95 | + if (!arraySome($directives, function(DirectiveInterface $directive) { |
|
| 96 | 96 | return $directive->getName() === 'include'; |
| 97 | 97 | })) { |
| 98 | 98 | $directives[] = GraphQLIncludeDirective(); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - if (!arraySome($directives, function (DirectiveInterface $directive) { |
|
| 101 | + if (!arraySome($directives, function(DirectiveInterface $directive) { |
|
| 102 | 102 | return $directive->getName() === 'deprecated'; |
| 103 | 103 | })) { |
| 104 | 104 | $directives[] = GraphQLDeprecatedDirective(); |
@@ -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 | }, []); |