Completed
Push — master ( e77f38...80f826 )
by Sam
14s
created
src/Execution/ValuesHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return $coercedValues;
57 57
         }
58 58
 
59
-        $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) {
59
+        $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) {
60 60
             return $value->getNameValue();
61 61
         });
62 62
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         array $variableValues = []
132 132
     ): ?array {
133 133
         $directiveNode = $node->hasDirectives()
134
-            ? find($node->getDirectives(), function (NameAwareInterface $value) use ($directive) {
134
+            ? find($node->getDirectives(), function(NameAwareInterface $value) use ($directive) {
135 135
                 return $value->getNameValue() === $directive->getName();
136 136
             }) : null;
137 137
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                 ]);
330 330
             }
331 331
             return new CoercedValue($parseResult, null);
332
-        } catch (InvalidTypeException|CoercingException $ex) {
332
+        } catch (InvalidTypeException | CoercingException $ex) {
333 333
             return new CoercedValue(null, [
334 334
                 $this->buildCoerceException(
335 335
                     sprintf('Expected type %s', (string)$type),
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
             }
364 364
         }
365 365
 
366
-        $suggestions = suggestionList((string)$value, array_map(function (EnumValue $enumValue) {
366
+        $suggestions = suggestionList((string)$value, array_map(function(EnumValue $enumValue) {
367 367
             return $enumValue->getName();
368 368
         }, $type->getValues()));
369 369
 
Please login to merge, or discard this patch.
src/Schema/Resolver/AbstractResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function getTypeResolver(): ?callable
27 27
     {
28
-        return function ($rootValue, $contextValues, ResolveInfo $info) {
28
+        return function($rootValue, $contextValues, ResolveInfo $info) {
29 29
             return $this->resolveType($rootValue, $contextValues, $info);
30 30
         };
31 31
     }
Please login to merge, or discard this patch.
src/Error/GraphQLException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getLocationsAsArray(): ?array
154 154
     {
155
-        return !empty($this->locations) ? \array_map(function (SourceLocation $location) {
155
+        return !empty($this->locations) ? \array_map(function(SourceLocation $location) {
156 156
             return $location->toArray();
157 157
         }, $this->locations) : null;
158 158
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             ? (!empty($nodes) ? $nodes : [])
192 192
             : (null !== $nodes ? [$nodes] : []);
193 193
 
194
-        $this->nodes = \array_filter($nodes, function ($node) {
194
+        $this->nodes = \array_filter($nodes, function($node) {
195 195
             return null !== $node;
196 196
         });
197 197
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     protected function resolvePositions(?array $positions)
223 223
     {
224 224
         if (null === $positions && !empty($this->nodes)) {
225
-            $positions = \array_reduce($this->nodes, function (array $list, ?NodeInterface $node) {
225
+            $positions = \array_reduce($this->nodes, function(array $list, ?NodeInterface $node) {
226 226
                 if (null !== $node) {
227 227
                     $location = $node->getLocation();
228 228
                     if (null !== $location) {
@@ -250,11 +250,11 @@  discard block
 block discarded – undo
250 250
     protected function resolveLocations(?array $positions, ?Source $source)
251 251
     {
252 252
         if (null !== $positions && null !== $source) {
253
-            $locations = \array_map(function ($position) use ($source) {
253
+            $locations = \array_map(function($position) use ($source) {
254 254
                 return SourceLocation::fromSource($source, $position);
255 255
             }, $positions);
256 256
         } elseif (!empty($this->nodes)) {
257
-            $locations = \array_reduce($this->nodes, function (array $list, NodeInterface $node) {
257
+            $locations = \array_reduce($this->nodes, function(array $list, NodeInterface $node) {
258 258
                 $location = $node->getLocation();
259 259
                 if (null !== $location) {
260 260
                     $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart());
Please login to merge, or discard this patch.
src/Language/SourceLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         \preg_match_all("/\r\n|[\n\r]/", \substr($source->getBody(), 0, $position), $matches, PREG_OFFSET_CAPTURE);
62 62
 
63 63
         foreach ($matches[0] as $index => $match) {
64
-            $line   += 1;
64
+            $line += 1;
65 65
             $column = $position + 1 - ($match[1] + \strlen($match[0]));
66 66
         }
67 67
 
Please login to merge, or discard this patch.
src/Language/Lexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -578,7 +578,7 @@
 block discarded – undo
578 578
             if ($this->isEscapedTripleQuote($code)) {
579 579
                 $rawValue       .= sliceString($this->body, $chunkStart, $this->position) . '"""';
580 580
                 $this->position += 4;
581
-                $chunkStart     = $this->position;
581
+                $chunkStart = $this->position;
582 582
             } else {
583 583
                 ++$this->position;
584 584
             }
Please login to merge, or discard this patch.
src/Type/directives.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 {
51 51
     return arraySome(
52 52
         specifiedDirectives(),
53
-        function (Directive $specifiedDirective) use ($directive) {
53
+        function(Directive $specifiedDirective) use ($directive) {
54 54
             return $specifiedDirective->getName() === $directive->getName();
55 55
         }
56 56
     );
Please login to merge, or discard this patch.
src/Schema/Extension/ExtensionContext.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function getExtendedTypes(): array
114 114
     {
115
-        $extendedTypes = \array_map(function ($type) {
115
+        $extendedTypes = \array_map(function($type) {
116 116
             return $this->getExtendedType($type);
117 117
         }, $this->info->getSchema()->getTypeMap());
118 118
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
         return \array_merge(
136 136
             $existingDirectives,
137
-            \array_map(function (DirectiveDefinitionNode $node) {
137
+            \array_map(function(DirectiveDefinitionNode $node) {
138 138
                 return $this->definitionBuilder->buildDirective($node);
139 139
             }, $this->info->getDirectiveDefinitions())
140 140
         );
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
         return newObjectType([
241 241
             'name'              => $typeName,
242 242
             'description'       => $type->getDescription(),
243
-            'interfaces'        => function () use ($type) {
243
+            'interfaces'        => function() use ($type) {
244 244
                 return $this->extendImplementedInterfaces($type);
245 245
             },
246
-            'fields'            => function () use ($type) {
246
+            'fields'            => function() use ($type) {
247 247
                 return $this->extendFieldMap($type);
248 248
             },
249 249
             'astNode'           => $type->getAstNode(),
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         return newInterfaceType([
270 270
             'name'              => $typeName,
271 271
             'description'       => $type->getDescription(),
272
-            'fields'            => function () use ($type) {
272
+            'fields'            => function() use ($type) {
273 273
                 return $this->extendFieldMap($type);
274 274
             },
275 275
             'astNode'           => $type->getAstNode(),
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         return newUnionType([
300 300
             'name'        => $type->getName(),
301 301
             'description' => $type->getDescription(),
302
-            'types'       => \array_map(function ($unionType) {
302
+            'types'       => \array_map(function($unionType) {
303 303
                 return $this->getExtendedType($unionType);
304 304
             }, $type->getTypes()),
305 305
             'astNode'     => $type->getAstNode(),
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     {
317 317
         $typeName = $type->getName();
318 318
 
319
-        $interfaces = \array_map(function (InterfaceType $interface) {
319
+        $interfaces = \array_map(function(InterfaceType $interface) {
320 320
             return $this->getExtendedType($interface);
321 321
         }, $type->getInterfaces());
322 322
 
Please login to merge, or discard this patch.
src/Util/utils.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     return $count === 1
37 37
         ? $selected[0]
38
-        : \array_reduce($selected, function ($list, $item) use ($count, &$index) {
38
+        : \array_reduce($selected, function($list, $item) use ($count, &$index) {
39 39
             $list .= ($index > 0 && $index < ($count - 1) ? ', ' : '') . ($index === ($count - 1) ? ' or ' : '') .
40 40
                 $item;
41 41
             $index++;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     $result = \array_keys($optionsByDistance);
71 71
 
72
-    \usort($result, function ($a, $b) use ($optionsByDistance) {
72
+    \usort($result, function($a, $b) use ($optionsByDistance) {
73 73
         return $optionsByDistance[$a] - $optionsByDistance[$b];
74 74
     });
75 75
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  */
85 85
 function quotedOrList(array $items): string
86 86
 {
87
-    return orList(\array_map(function ($item) {
87
+    return orList(\array_map(function($item) {
88 88
         return '"' . $item . '"';
89 89
     }, $items));
90 90
 }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function arrayEvery(array $array, callable $fn): bool
100 100
 {
101
-    return \array_reduce($array, function ($result, $value) use ($fn) {
101
+    return \array_reduce($array, function($result, $value) use ($fn) {
102 102
         return $result && $fn($value);
103 103
     }, true);
104 104
 }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
  */
111 111
 function arraySome(array $array, callable $fn)
112 112
 {
113
-    return \array_reduce($array, function ($result, $value) use ($fn) {
113
+    return \array_reduce($array, function($result, $value) use ($fn) {
114 114
         return $result || $fn($value);
115 115
     });
116 116
 }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  */
139 139
 function keyMap(array $array, callable $keyFn): array
140 140
 {
141
-    return \array_reduce($array, function ($map, $item) use ($keyFn) {
141
+    return \array_reduce($array, function($map, $item) use ($keyFn) {
142 142
         $map[$keyFn($item)] = $item;
143 143
         return $map;
144 144
     }, []);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
  */
153 153
 function keyValueMap(array $array, callable $keyFn, callable $valFn): array
154 154
 {
155
-    return \array_reduce($array, function ($map, $item) use ($keyFn, $valFn) {
155
+    return \array_reduce($array, function($map, $item) use ($keyFn, $valFn) {
156 156
         $map[$keyFn($item)] = $valFn($item);
157 157
         return $map;
158 158
     }, []);
Please login to merge, or discard this patch.
src/Language/NodePrinter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@
 block discarded – undo
370 370
      */
371 371
     protected function printMany(array $nodes): array
372 372
     {
373
-        return \array_map(function ($node) {
373
+        return \array_map(function($node) {
374 374
             return $this->print($node);
375 375
         }, $nodes);
376 376
     }
Please login to merge, or discard this patch.