Completed
Pull Request — master (#45)
by Christoffer
02:13
created
src/Util/orList.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
 function quotedOrList(array $items): string
27 27
 {
28
-    return orList(array_map(function ($item) {
28
+    return orList(array_map(function($item) {
29 29
         return '"' . $item . '"';
30 30
     }, $items));
31 31
 }
Please login to merge, or discard this patch.
src/Util/suggestionList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     $result = array_keys($optionsByDistance);
26 26
 
27
-    usort($result, function ($a, $b) use ($optionsByDistance) {
27
+    usort($result, function($a, $b) use ($optionsByDistance) {
28 28
         return $optionsByDistance[$a] - $optionsByDistance[$b];
29 29
     });
30 30
 
Please login to merge, or discard this patch.
src/Validation/Rule/KnownArgumentNamesRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                                     (string)$parentType,
36 36
                                     suggestionList(
37 37
                                         $node->getNameValue(),
38
-                                        array_map(function (Argument $argument) {
38
+                                        array_map(function(Argument $argument) {
39 39
                                             return $argument->getName();
40 40
                                         }, $fieldDefinition->getArguments())
41 41
                                     )
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                                     (string)$directive,
56 56
                                     suggestionList(
57 57
                                         (string)$node,
58
-                                        array_map(function (Argument $argument) {
58
+                                        array_map(function(Argument $argument) {
59 59
                                             return $argument->getName();
60 60
                                         }, $directive->getArguments())
61 61
                                     )
Please login to merge, or discard this patch.
src/Validation/Rule/FragmentsOnCompositeTypesRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
     public function enterNode(NodeInterface $node): ?NodeInterface
18 18
     {
19 19
         if ($node instanceof InlineFragmentNode) {
20
-            $this->validateFragementNode($node, function (NodeInterface $node) {
20
+            $this->validateFragementNode($node, function(NodeInterface $node) {
21 21
                 /** @noinspection PhpUndefinedMethodInspection */
22 22
                 return inlineFragmentOnNonCompositeMessage((string)$node->getTypeCondition());
23 23
             });
24 24
         }
25 25
 
26 26
         if ($node instanceof FragmentDefinitionNode) {
27
-            $this->validateFragementNode($node, function (NodeInterface $node) {
27
+            $this->validateFragementNode($node, function(NodeInterface $node) {
28 28
                 /** @noinspection PhpUndefinedMethodInspection */
29 29
                 return fragmentOnNonCompositeMessage((string)$node, (string)$node->getTypeCondition());
30 30
             });
Please login to merge, or discard this patch.
src/Error/GraphQLException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function getLocationsAsArray(): ?array
152 152
     {
153
-        return !empty($this->locations) ? array_map(function (SourceLocation $location) {
153
+        return !empty($this->locations) ? array_map(function(SourceLocation $location) {
154 154
             return $location->toArray();
155 155
         }, $this->locations) : null;
156 156
     }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     protected function resolvePositions(?array $positions)
209 209
     {
210 210
         if (null === $positions && !empty($this->nodes)) {
211
-            $positions = array_reduce($this->nodes, function (array $list, NodeInterface $node) {
211
+            $positions = array_reduce($this->nodes, function(array $list, NodeInterface $node) {
212 212
                 $location = $node->getLocation();
213 213
                 if (null !== $location) {
214 214
                     $list[] = $location->getStart();
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
     protected function resolveLocations(?array $positions, ?Source $source)
235 235
     {
236 236
         if (null !== $positions && null !== $source) {
237
-            $locations = array_map(function ($position) use ($source) {
237
+            $locations = array_map(function($position) use ($source) {
238 238
                 return SourceLocation::fromSource($source, $position);
239 239
             }, $positions);
240 240
         } elseif (!empty($this->nodes)) {
241
-            $locations = array_reduce($this->nodes, function (array $list, NodeInterface $node) {
241
+            $locations = array_reduce($this->nodes, function(array $list, NodeInterface $node) {
242 242
                 $location = $node->getLocation();
243 243
                 if (null !== $location) {
244 244
                     $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart());
Please login to merge, or discard this patch.
src/Error/printError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $line < \count($lines) ? leftPad($padLen, $nextLineNum) . ': ' . $lines[$line] : null,
63 63
     ];
64 64
 
65
-    return implode("\n", array_filter($outputLines, function ($line) {
65
+    return implode("\n", array_filter($outputLines, function($line) {
66 66
         return null !== $line;
67 67
     }));
68 68
 }
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
@@ -59,7 +59,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Validation/Rule/LoneAnonymousOperationRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Language/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,5 +137,5 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.