@@ -46,7 +46,7 @@ |
||
46 | 46 | * Provided a type and a super type, return true if the first type is either |
47 | 47 | * equal or a subset of the second super type (covariant). |
48 | 48 | * |
49 | - * @param InterfaceType|UnionType $maybeSubType |
|
49 | + * @param Type $maybeSubType |
|
50 | 50 | * @param InterfaceType|UnionType $superType |
51 | 51 | * |
52 | 52 | * @return bool |
@@ -479,7 +479,7 @@ |
||
479 | 479 | } |
480 | 480 | |
481 | 481 | /** |
482 | - * @return ScalarType|EnumType|InputObjectType|ListOfType|NonNull|null |
|
482 | + * @return Type |
|
483 | 483 | */ |
484 | 484 | public function getInputType() : ?InputType |
485 | 485 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
306 | - * @param mixed[] $traversable |
|
306 | + * @param string[] $traversable |
|
307 | 307 | * |
308 | 308 | * @return bool |
309 | 309 | */ |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | * |
556 | 556 | * @param ErrorException[] $errors |
557 | 557 | * |
558 | - * @return callable |
|
558 | + * @return \Closure |
|
559 | 559 | */ |
560 | 560 | public static function withErrorHandling(callable $fn, array &$errors) |
561 | 561 | { |
@@ -38,6 +38,7 @@ |
||
38 | 38 | * |
39 | 39 | * @param ScalarType|EnumType|InputObjectType|ListOfType|NonNull $type |
40 | 40 | * @param mixed[] $path |
41 | + * @param \GraphQL\Language\AST\VariableDefinitionNode $blameNode |
|
41 | 42 | */ |
42 | 43 | public static function coerceValue($value, InputType $type, $blameNode = null, ?array $path = null) |
43 | 44 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * suggest them, sorted by how often the type is referenced, starting |
73 | 73 | * with Interfaces. |
74 | 74 | * |
75 | - * @param ObjectType|InterfaceType $type |
|
75 | + * @param Type $type |
|
76 | 76 | * @param string $fieldName |
77 | 77 | * |
78 | 78 | * @return string[] |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * For the field name provided, determine if there are any similar field names |
120 | 120 | * that may be the result of a typo. |
121 | 121 | * |
122 | - * @param ObjectType|InterfaceType $type |
|
122 | + * @param Type $type |
|
123 | 123 | * @param string $fieldName |
124 | 124 | * |
125 | 125 | * @return array|string[] |
@@ -878,10 +878,17 @@ |
||
878 | 878 | ); |
879 | 879 | } |
880 | 880 | |
881 | + /** |
|
882 | + * @param string $reason |
|
883 | + */ |
|
881 | 884 | public static function reasonMessage($reason) |
882 | 885 | { |
883 | 886 | if (is_array($reason)) { |
884 | 887 | $tmp = array_map( |
888 | + |
|
889 | + /** |
|
890 | + * @param string $tmp |
|
891 | + */ |
|
885 | 892 | static function ($tmp) { |
886 | 893 | [$responseName, $subReason] = $tmp; |
887 | 894 |
@@ -135,6 +135,9 @@ |
||
135 | 135 | ); |
136 | 136 | } |
137 | 137 | |
138 | + /** |
|
139 | + * @param string $name |
|
140 | + */ |
|
138 | 141 | private function getFragmentType(ValidationContext $context, $name) |
139 | 142 | { |
140 | 143 | $frag = $context->getFragment($name); |
@@ -100,6 +100,9 @@ discard block |
||
100 | 100 | ); |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @return callable |
|
105 | + */ |
|
103 | 106 | private function fieldComplexity($node, $complexity = 0) |
104 | 107 | { |
105 | 108 | if (isset($node->selectionSet) && $node->selectionSet instanceof SelectionSetNode) { |
@@ -287,6 +290,10 @@ discard block |
||
287 | 290 | $this->maxQueryComplexity = (int) $maxQueryComplexity; |
288 | 291 | } |
289 | 292 | |
293 | + /** |
|
294 | + * @param integer $max |
|
295 | + * @param integer $count |
|
296 | + */ |
|
290 | 297 | public static function maxQueryComplexityErrorMessage($max, $count) |
291 | 298 | { |
292 | 299 | return sprintf('Max query complexity should be %d but got %d.', $max, $count); |
@@ -106,6 +106,9 @@ |
||
106 | 106 | $this->maxQueryDepth = (int) $maxQueryDepth; |
107 | 107 | } |
108 | 108 | |
109 | + /** |
|
110 | + * @param integer $max |
|
111 | + */ |
|
109 | 112 | public static function maxQueryDepthErrorMessage($max, $count) |
110 | 113 | { |
111 | 114 | return sprintf('Max query depth should be %d but got %d.', $max, $count); |