Completed
Pull Request — master (#108)
by Christoffer
03:17
created
src/Language/SchemaBuilder/SchemaBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,27 +78,27 @@
 block discarded – undo
78 78
 
79 79
         $this->definitionBuilder->setTypeDefinitionMap($nodeMap);
80 80
 
81
-        $types = array_map(function (TypeDefinitionNodeInterface $definition) {
81
+        $types = array_map(function(TypeDefinitionNodeInterface $definition) {
82 82
             return $this->definitionBuilder->buildType($definition);
83 83
         }, $typeDefinitions);
84 84
 
85
-        $directives = array_map(function (DirectiveDefinitionNode $definition) {
85
+        $directives = array_map(function(DirectiveDefinitionNode $definition) {
86 86
             return $this->definitionBuilder->buildDirective($definition);
87 87
         }, $directiveDefinitions);
88 88
 
89
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
89
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
90 90
             return $directive->getName() === 'skip';
91 91
         })) {
92 92
             $directives[] = GraphQLSkipDirective();
93 93
         }
94 94
 
95
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
95
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
96 96
             return $directive->getName() === 'include';
97 97
         })) {
98 98
             $directives[] = GraphQLIncludeDirective();
99 99
         }
100 100
 
101
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
101
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
102 102
             return $directive->getName() === 'deprecated';
103 103
         })) {
104 104
             $directives[] = GraphQLDeprecatedDirective();
Please login to merge, or discard this patch.
src/Validation/Conflict/FindsConflictsTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -691,13 +691,13 @@
 block discarded – undo
691 691
 
692 692
         return new Conflict(
693 693
             $responseName,
694
-            array_map(function (Conflict $conflict) {
694
+            array_map(function(Conflict $conflict) {
695 695
                 return [$conflict->getResponseName(), $conflict->getReason()];
696 696
             }, $conflicts),
697
-            array_reduce($conflicts, function ($allFields, Conflict $conflict) {
697
+            array_reduce($conflicts, function($allFields, Conflict $conflict) {
698 698
                 return array_merge($allFields, $conflict->getFieldsA());
699 699
             }, [$nodeA]),
700
-            array_reduce($conflicts, function ($allFields, Conflict $conflict) {
700
+            array_reduce($conflicts, function($allFields, Conflict $conflict) {
701 701
                 return array_merge($allFields, $conflict->getFieldsB());
702 702
             }, [$nodeB])
703 703
         );
Please login to merge, or discard this patch.
src/Execution/ValuesResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             return $coercedValues;
47 47
         }
48 48
 
49
-        $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) {
49
+        $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) {
50 50
             return $value->getNameValue();
51 51
         });
52 52
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $variableValues = []
178 178
     ): ?array {
179 179
         $directiveNode = $node->hasDirectives()
180
-            ? find($node->getDirectives(), function (NamedTypeNode $value) use ($directive) {
180
+            ? find($node->getDirectives(), function(NamedTypeNode $value) use ($directive) {
181 181
                 return $value->getNameValue() === $directive->getName();
182 182
             }) : null;
183 183
 
Please login to merge, or discard this patch.
src/Validation/messages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
         return conflictReasonMessage([$reason]);
219 219
     }
220 220
 
221
-    return implode(' and ', array_map(function ($reason) {
221
+    return implode(' and ', array_map(function($reason) {
222 222
         [$responseName, $subreason] = $reason;
223 223
         return sprintf('subfields "%s" conflict because %s', $responseName, conflictReasonMessage($subreason));
224 224
     }, $reason));
Please login to merge, or discard this patch.
src/Type/Schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function getDirective(string $name): ?Directive
127 127
     {
128
-        return find($this->directives, function (Directive $directive) use ($name) {
128
+        return find($this->directives, function(Directive $directive) use ($name) {
129 129
             return $directive->getName() === $name;
130 130
         });
131 131
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 )
178 178
             );
179 179
 
180
-            $this->_possibleTypeMap[$abstractTypeName] = array_reduce($possibleTypes, function (array $map, TypeInterface $type) {
180
+            $this->_possibleTypeMap[$abstractTypeName] = array_reduce($possibleTypes, function(array $map, TypeInterface $type) {
181 181
                 $map[$type->getName()] = true;
182 182
                 return $map;
183 183
             }, []);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     if ($type instanceof ObjectType || $type instanceof InterfaceType) {
389 389
         foreach ($type->getFields() as $field) {
390 390
             if ($field->hasArguments()) {
391
-                $fieldArgTypes = array_map(function (Argument $argument) {
391
+                $fieldArgTypes = array_map(function(Argument $argument) {
392 392
                     return $argument->getType();
393 393
                 }, $field->getArguments());
394 394
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         return $map;
420 420
     }
421 421
 
422
-    return array_reduce($directive->getArguments(), function ($map, Argument $argument) {
422
+    return array_reduce($directive->getArguments(), function($map, Argument $argument) {
423 423
         return typeMapReducer($map, $argument->getType());
424 424
     }, $map);
425 425
 }
Please login to merge, or discard this patch.
src/Validation/Rule/NoFragmentCyclesRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
 
102 102
                 $this->validationContext->reportError(
103 103
                     new ValidationException(
104
-                        fragmentCycleMessage($spreadName, \array_map(function (FragmentSpreadNode $spread) {
104
+                        fragmentCycleMessage($spreadName, \array_map(function(FragmentSpreadNode $spread) {
105 105
                             return $spread->getNameValue();
106 106
                         }, $cyclePath)),
107 107
                         \array_merge($cyclePath, [$spreadNode])
Please login to merge, or discard this patch.
src/Validation/Validator.php 1 patch
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->contextBuilder->build($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->setValidationContext($context);
51 51
         }, $rules);
52 52
 
Please login to merge, or discard this patch.
src/Validation/Rule/ProvidedNonNullArgumentsRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             }
35 35
 
36 36
             $argumentNodes   = $node->getArguments();
37
-            $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $argument) {
37
+            $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $argument) {
38 38
                 return $argument->getNameValue();
39 39
             });
40 40
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             }
66 66
 
67 67
             $argumentNodes   = $node->getArguments();
68
-            $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $argument) {
68
+            $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $argument) {
69 69
                 return $argument->getNameValue();
70 70
             });
71 71
 
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
@@ -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.