@@ -59,7 +59,7 @@ |
||
59 | 59 | preg_match_all("/\r\n|[\n\r]/", mb_substr($source->getBody(), 0, $position), $matches, PREG_OFFSET_CAPTURE); |
60 | 60 | |
61 | 61 | foreach ($matches[0] as $index => $match) { |
62 | - $line += 1; |
|
62 | + $line += 1; |
|
63 | 63 | $column = $position + 1 - ($match[1] + mb_strlen($match[0])); |
64 | 64 | } |
65 | 65 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** @var Directive $directiveDefinition */ |
43 | 43 | $directiveDefinition = find( |
44 | 44 | $this->context->getSchema()->getDirectives(), |
45 | - function (Directive $definition) use ($node) { |
|
45 | + function(Directive $definition) use ($node) { |
|
46 | 46 | return $definition->getName() === $node->getNameValue(); |
47 | 47 | } |
48 | 48 | ); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function enterNode(NodeInterface $node): ?NodeInterface |
21 | 21 | { |
22 | 22 | if ($node instanceof DocumentNode) { |
23 | - $this->operationCount = \count(array_filter($node->getDefinitions(), function ($definition) { |
|
23 | + $this->operationCount = \count(array_filter($node->getDefinitions(), function($definition) { |
|
24 | 24 | return $definition instanceof OperationDefinitionNode; |
25 | 25 | })); |
26 | 26 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | $this->context->reportError( |
86 | 86 | new ValidationException( |
87 | - fragmentCycleMessage($spreadName, array_map(function (FragmentSpreadNode $spread) { |
|
87 | + fragmentCycleMessage($spreadName, array_map(function(FragmentSpreadNode $spread) { |
|
88 | 88 | return $spread->getNameValue(); |
89 | 89 | }, $cyclePath)), |
90 | 90 | array_merge($cyclePath, [$spreadNode]) |
@@ -137,5 +137,5 @@ |
||
137 | 137 | */ |
138 | 138 | function locationShorthandToArray(array $shorthand): ?array |
139 | 139 | { |
140 | - return isset($shorthand[0], $shorthand[1]) ? ['line' => $shorthand[0], 'column' => $shorthand[1]] :null; |
|
140 | + return isset($shorthand[0], $shorthand[1]) ? ['line' => $shorthand[0], 'column' => $shorthand[1]] : null; |
|
141 | 141 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function getFragment(string $name): ?FragmentDefinitionNode |
144 | 144 | { |
145 | 145 | if (empty($this->fragments)) { |
146 | - $this->fragments = array_reduce($this->document->getDefinitions(), function ($fragments, $definition) { |
|
146 | + $this->fragments = array_reduce($this->document->getDefinitions(), function($fragments, $definition) { |
|
147 | 147 | if ($definition instanceof FragmentDefinitionNode) { |
148 | 148 | $fragments[$definition->getNameValue()] = $definition; |
149 | 149 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $usages = []; |
222 | 222 | $typeInfo = new TypeInfo($this->schema); |
223 | 223 | $visitor = new TypeInfoVisitor($typeInfo, new Visitor( |
224 | - function (NodeInterface $node) use (&$usages, $typeInfo): ?NodeInterface { |
|
224 | + function(NodeInterface $node) use (&$usages, $typeInfo): ?NodeInterface { |
|
225 | 225 | if ($node instanceof VariableDefinitionNode) { |
226 | 226 | return null; |
227 | 227 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | $context = $this->contextBuilder->build($schema, $document, $typeInfo); |
40 | 40 | |
41 | - $visitors = array_map(function (RuleInterface $rule) use ($context) { |
|
41 | + $visitors = array_map(function(RuleInterface $rule) use ($context) { |
|
42 | 42 | return $rule->setContext($context); |
43 | 43 | }, $rules ?? specifiedRules()); |
44 | 44 |