Passed
Pull Request — master (#190)
by Sebastian
03:03
created
src/Validation/ValidationContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             $usages = [];
205 205
             $typeInfo = new TypeInfo($this->schema);
206 206
             $visitor = new TypeInfoVisitor($typeInfo, new Visitor(
207
-              function (NodeInterface $node) use (
207
+              function(NodeInterface $node) use (
208 208
                 &$usages,
209 209
                 $typeInfo
210 210
               ): ?NodeInterface {
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     {
309 309
         if (empty($this->fragments)) {
310 310
             $this->fragments = array_reduce($this->document->getDefinitions(),
311
-              function ($fragments, $definition) {
311
+              function($fragments, $definition) {
312 312
                   if ($definition instanceof FragmentDefinitionNode) {
313 313
                       $fragments[$definition->getNameValue()] = $definition;
314 314
                   }
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
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     ): ?NodeInterface
30 30
     {
31 31
         $this->validateFragementNode($node,
32
-          function (FragmentDefinitionNode $node) {
32
+          function(FragmentDefinitionNode $node) {
33 33
               return fragmentOnNonCompositeMessage((string)$node,
34 34
                 (string)$node->getTypeCondition());
35 35
           });
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     ): ?NodeInterface
45 45
     {
46 46
         $this->validateFragementNode($node,
47
-          function (InlineFragmentNode $node) {
47
+          function(InlineFragmentNode $node) {
48 48
               return inlineFragmentOnNonCompositeMessage((string)$node->getTypeCondition());
49 49
           });
50 50
 
Please login to merge, or discard this patch.
src/Validation/Rule/ValuesOfCorrectTypeRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     {
153 153
         if ($type instanceof EnumType) {
154 154
             $suggestions = suggestionList(printNode($node),
155
-              \array_map(function (EnumValue $value) {
155
+              \array_map(function(EnumValue $value) {
156 156
                   return $value->getName();
157 157
               }, $type->getValues()));
158 158
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         // Ensure every required field exists.
207 207
         $inputFields = $type->getFields();
208 208
         $fieldNodeMap = keyMap($node->getFields(),
209
-          function (ObjectFieldNode $field) {
209
+          function(ObjectFieldNode $field) {
210 210
               return $field->getNameValue();
211 211
           });
212 212
 
Please login to merge, or discard this patch.
src/Validation/Rule/FieldOnCorrectTypeRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $suggestedInterfaceTypes = \array_keys($interfaceUsageCount);
112 112
 
113 113
         \uasort($suggestedInterfaceTypes,
114
-          function ($a, $b) use ($interfaceUsageCount) {
114
+          function($a, $b) use ($interfaceUsageCount) {
115 115
               return $interfaceUsageCount[$b] - $interfaceUsageCount[$a];
116 116
           });
117 117
 
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
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $parentType = $this->context->getParentType();
55 55
 
56 56
         if (null !== $fieldDefinition && null !== $parentType) {
57
-            $options = array_map(function (Argument $argument) {
57
+            $options = array_map(function(Argument $argument) {
58 58
                 return $argument->getName();
59 59
             }, $fieldDefinition->getArguments());
60 60
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $directive = $this->context->getDirective();
84 84
 
85 85
         if (null !== $directive) {
86
-            $options = array_map(function (Argument $argument) {
86
+            $options = array_map(function(Argument $argument) {
87 87
                 return $argument->getName();
88 88
             }, $directive->getArguments());
89 89
 
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
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                 $this->context->reportError(
107 107
                   new ValidationException(
108 108
                     fragmentCycleMessage($spreadName,
109
-                      \array_map(function (FragmentSpreadNode $spread) {
109
+                      \array_map(function(FragmentSpreadNode $spread) {
110 110
                           return $spread->getNameValue();
111 111
                       }, $cyclePath)),
112 112
                     \array_merge($cyclePath, [$spreadNode])
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
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     protected function enterDocument(DocumentNode $node): ?NodeInterface
29 29
     {
30 30
         $this->operationCount = \count(\array_filter($node->getDefinitions(),
31
-          function ($definition) {
31
+          function($definition) {
32 32
               return $definition instanceof OperationDefinitionNode;
33 33
           }));
34 34
 
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
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $argumentNodes = $node->getArguments();
38 38
         $argumentNodeMap = keyMap($argumentNodes,
39
-          function (ArgumentNode $argument) {
39
+          function(ArgumentNode $argument) {
40 40
               return $argument->getNameValue();
41 41
           });
42 42
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $argumentNodes = $node->getArguments();
76 76
         $argumentNodeMap = keyMap($argumentNodes,
77
-          function (ArgumentNode $argument) {
77
+          function(ArgumentNode $argument) {
78 78
               return $argument->getNameValue();
79 79
           });
80 80
 
Please login to merge, or discard this patch.
src/Validation/Rule/KnownDirectivesRule.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
         /** @var Directive $directiveDefinition */
51 51
         $directiveDefinition = find(
52 52
           $this->context->getSchema()->getDirectives(),
53
-          function (Directive $definition) use ($node) {
53
+          function(Directive $definition) use ($node) {
54 54
               return $definition->getName() === $node->getNameValue();
55 55
           }
56 56
         );
Please login to merge, or discard this patch.