Passed
Pull Request — master (#190)
by Sebastian
03:03
created
src/Language/Node/InputFieldsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function getFieldsAsArray(): array
28 28
     {
29
-        return array_map(function (SerializationInterface $node) {
29
+        return array_map(function(SerializationInterface $node) {
30 30
             return $node->toArray();
31 31
         }, $this->fields);
32 32
     }
Please login to merge, or discard this patch.
src/Language/Node/ObjectValueNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function getFieldsAsArray(): array
28 28
     {
29
-        return array_map(function (SerializationInterface $node) {
29
+        return array_map(function(SerializationInterface $node) {
30 30
             return $node->toArray();
31 31
         }, $this->fields);
32 32
     }
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
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function getArgumentsAsArray(): 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->getArguments());
39 39
     }
Please login to merge, or discard this patch.
src/Language/Node/SchemaDefinitionNode.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function getOperationTypesAsArray(): 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->operationTypes);
39 39
     }
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
     public function toArray(): array
56 56
     {
57 57
         return [
58
-          'kind' => $this->kind,
59
-          'directives' => $this->getDirectivesAsArray(),
60
-          'operationTypes' => $this->getOperationTypesAsArray(),
61
-          'loc' => $this->getLocationAsArray(),
58
+            'kind' => $this->kind,
59
+            'directives' => $this->getDirectivesAsArray(),
60
+            'operationTypes' => $this->getOperationTypesAsArray(),
61
+            'loc' => $this->getLocationAsArray(),
62 62
         ];
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
src/Language/Node/EnumValuesTrait.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 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
     }
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
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function getVariableDefinitionsAsArray(): array
28 28
     {
29
-        return array_map(function (SerializationInterface $node) {
29
+        return array_map(function(SerializationInterface $node) {
30 30
             return $node->toArray();
31 31
         }, $this->variableDefinitions);
32 32
     }
Please login to merge, or discard this patch.
src/Execution/ExecutionResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $array = ['data' => $this->data];
67 67
 
68 68
         if (!empty($this->errors)) {
69
-            $array['errors'] = array_map(function (GraphQLException $error) {
69
+            $array['errors'] = array_map(function(GraphQLException $error) {
70 70
                 return $error->toArray();
71 71
             }, $this->errors);
72 72
         }
Please login to merge, or discard this patch.
src/Language/utils.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
  */
147 147
 function locationsShorthandToArray(array $locations): array
148 148
 {
149
-    return array_map(function ($shorthand) {
149
+    return array_map(function($shorthand) {
150 150
         return locationShorthandToArray($shorthand);
151 151
     }, $locations);
152 152
 }
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 function locationShorthandToArray(array $location): ?array
153 153
 {
154 154
     return isset($location[0], $location[1]) ? [
155
-      'line' => $location[0],
156
-      'column' => $location[1],
155
+        'line' => $location[0],
156
+        'column' => $location[1],
157 157
     ] : null;
158 158
 }
159 159
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
  * @return string
188 188
  */
189 189
 function wrap(
190
-  string $start,
190
+    string $start,
191 191
   ?string $maybeString = null,
192 192
   ?string $end = null
193 193
 ): string {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 function dedent(string $str): string
214 214
 {
215 215
     $trimmed = \preg_replace("/^\n*|[ \t]*$/", '',
216
-      $str); // Remove leading newline and trailing whitespace
216
+        $str); // Remove leading newline and trailing whitespace
217 217
     $matches = [];
218 218
     \preg_match("/^[ \t]*/", $trimmed, $matches); // Figure out indent
219 219
     $indent = $matches[0];
Please login to merge, or discard this patch.
src/Validation/Validator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         $context = $this->createContext($schema, $document, $typeInfo);
48 48
 
49
-        $visitors = \array_map(function (RuleInterface $rule) use ($context) {
49
+        $visitors = \array_map(function(RuleInterface $rule) use ($context) {
50 50
             return $rule->setContext($context);
51 51
         }, $rules);
52 52
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      * @inheritdoc
35 35
      */
36 36
     public function validate(
37
-      SchemaInterface $schema,
38
-      DocumentNode $document,
37
+        SchemaInterface $schema,
38
+        DocumentNode $document,
39 39
       ?array $rules = null,
40 40
       ?TypeInfo $typeInfo = null
41 41
     ): array {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         }, $rules);
54 54
 
55 55
         $visitor = new TypeInfoVisitor($typeInfo,
56
-          new ParallelVisitor($visitors));
56
+            new ParallelVisitor($visitors));
57 57
 
58 58
         // Visit the whole document with each instance of all provided rules.
59 59
         $document->acceptVisitor($visitor);
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
      * @return ValidationContextInterface
70 70
      */
71 71
     public function createContext(
72
-      SchemaInterface $schema,
73
-      DocumentNode $document,
74
-      TypeInfo $typeInfo
72
+        SchemaInterface $schema,
73
+        DocumentNode $document,
74
+        TypeInfo $typeInfo
75 75
     ): ValidationContextInterface {
76 76
         return new ValidationContext($schema, $document, $typeInfo);
77 77
     }
Please login to merge, or discard this patch.