Passed
Pull Request — master (#209)
by Christoffer
02:27
created
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/Node/ListValueNode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getValuesAsArray(): array
40 40
     {
41
-        return \array_map(function (SerializationInterface $node) {
41
+        return \array_map(function(SerializationInterface $node) {
42 42
             return $node->toArray();
43 43
         }, $this->values);
44 44
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function __toString(): string
72 72
     {
73
-        return \json_encode(\array_map(function (ValueNodeInterface $node) {
73
+        return \json_encode(\array_map(function(ValueNodeInterface $node) {
74 74
             return $node->getValue();
75 75
         }, $this->getValues()));
76 76
     }
Please login to merge, or discard this patch.
src/Language/Node/ArgumentsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function getArgumentsAsArray(): 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->getArguments());
38 38
     }
Please login to merge, or discard this patch.
src/Language/Node/DocumentNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function getDefinitionsAsArray(): array
40 40
     {
41
-        return \array_map(function (SerializationInterface $node) {
41
+        return \array_map(function(SerializationInterface $node) {
42 42
             return $node->toArray();
43 43
         }, $this->definitions);
44 44
     }
Please login to merge, or discard this patch.
src/Language/Node/SchemaDefinitionNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function getOperationTypesAsArray(): array
44 44
     {
45
-        return \array_map(function (SerializationInterface $node) {
45
+        return \array_map(function(SerializationInterface $node) {
46 46
             return $node->toArray();
47 47
         }, $this->operationTypes);
48 48
     }
Please login to merge, or discard this patch.
src/Language/Node/DirectiveDefinitionNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public function getLocationsAsArray(): array
55 55
     {
56
-        return \array_map(function (SerializationInterface $node) {
56
+        return \array_map(function(SerializationInterface $node) {
57 57
             return $node->toArray();
58 58
         }, $this->locations);
59 59
     }
Please login to merge, or discard this patch.
src/Language/Node/VariableDefinitionsTrait.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
     public function getVariableDefinitionsAsArray(): array
26 26
     {
27
-        return \array_map(function (SerializationInterface $node) {
27
+        return \array_map(function(SerializationInterface $node) {
28 28
             return $node->toArray();
29 29
         }, $this->variableDefinitions);
30 30
     }
Please login to merge, or discard this patch.
src/Language/Node/TypesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function getTypesAsArray(): 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->types);
38 38
     }
Please login to merge, or discard this patch.