@@ -25,6 +25,9 @@ |
||
| 25 | 25 | |
| 26 | 26 | private $currentLeafFields; |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param double $percentOfLeafFields |
|
| 30 | + */ |
|
| 28 | 31 | public function __construct(Schema $schema, $percentOfLeafFields) |
| 29 | 32 | { |
| 30 | 33 | $this->schema = $schema; |
@@ -115,6 +115,9 @@ |
||
| 115 | 115 | return !empty($storiesFound) ? $storiesFound[count($storiesFound) - 1] : null; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param integer $limit |
|
| 120 | + */ |
|
| 118 | 121 | public static function findLikes($storyId, $limit) |
| 119 | 122 | { |
| 120 | 123 | $likes = isset(self::$storyLikes[$storyId]) ? self::$storyLikes[$storyId] : []; |
@@ -91,6 +91,7 @@ |
||
| 91 | 91 | * @param mixed[]|null $path |
| 92 | 92 | * @param Throwable $previous |
| 93 | 93 | * @param mixed[] $extensions |
| 94 | + * @param Source $source |
|
| 94 | 95 | */ |
| 95 | 96 | public function __construct( |
| 96 | 97 | $message, |
@@ -146,6 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | 148 | * @param int $len |
| 149 | + * @param string $str |
|
| 149 | 150 | * |
| 150 | 151 | * @return string |
| 151 | 152 | */ |
@@ -164,7 +165,7 @@ discard block |
||
| 164 | 165 | * For a list of available debug flags see GraphQL\Error\Debug constants. |
| 165 | 166 | * |
| 166 | 167 | * @param Throwable $e |
| 167 | - * @param bool|int $debug |
|
| 168 | + * @param boolean $debug |
|
| 168 | 169 | * @param string $internalErrorMessage |
| 169 | 170 | * |
| 170 | 171 | * @return mixed[] |
@@ -297,6 +298,7 @@ discard block |
||
| 297 | 298 | * If initial formatter is not set, FormattedError::createFromException is used |
| 298 | 299 | * |
| 299 | 300 | * @param bool|int $debug |
| 301 | + * @param callable $formatter |
|
| 300 | 302 | * |
| 301 | 303 | * @return callable|callable |
| 302 | 304 | */ |
@@ -77,6 +77,7 @@ |
||
| 77 | 77 | * @param mixed|null $contextValue |
| 78 | 78 | * @param mixed[]|ArrayAccess|null $variableValues |
| 79 | 79 | * @param string|null $operationName |
| 80 | + * @param Closure $fieldResolver |
|
| 80 | 81 | * |
| 81 | 82 | * @return ExecutionResult|Promise |
| 82 | 83 | * |
@@ -118,6 +118,8 @@ discard block |
||
| 118 | 118 | * @param mixed $contextValue |
| 119 | 119 | * @param mixed[]|Traversable $rawVariableValues |
| 120 | 120 | * @param string|null $operationName |
| 121 | + * @param callable $fieldResolver |
|
| 122 | + * @param PromiseAdapter $promiseAdapter |
|
| 121 | 123 | * |
| 122 | 124 | * @return ExecutionContext|Error[] |
| 123 | 125 | */ |
@@ -671,6 +673,11 @@ discard block |
||
| 671 | 673 | } |
| 672 | 674 | } |
| 673 | 675 | |
| 676 | + /** |
|
| 677 | + * @param FieldNode[] $fieldNodes |
|
| 678 | + * @param string[] $path |
|
| 679 | + * @param Type $returnType |
|
| 680 | + */ |
|
| 674 | 681 | private function handleFieldError($rawError, $fieldNodes, $path, $returnType) |
| 675 | 682 | { |
| 676 | 683 | $error = Error::createLocatedError( |
@@ -867,7 +874,7 @@ discard block |
||
| 867 | 874 | * Complete a list value by completing each item in the list with the inner type. |
| 868 | 875 | * |
| 869 | 876 | * @param FieldNode[] $fieldNodes |
| 870 | - * @param mixed[] $path |
|
| 877 | + * @param string[] $path |
|
| 871 | 878 | * @param mixed[]|Traversable $results |
| 872 | 879 | * |
| 873 | 880 | * @return mixed[]|Promise |
@@ -927,7 +934,7 @@ discard block |
||
| 927 | 934 | * of that value, then complete the value for that type. |
| 928 | 935 | * |
| 929 | 936 | * @param FieldNode[] $fieldNodes |
| 930 | - * @param mixed[] $path |
|
| 937 | + * @param string[] $path |
|
| 931 | 938 | * @param mixed[] $result |
| 932 | 939 | * |
| 933 | 940 | * @return mixed |
@@ -1143,7 +1150,7 @@ discard block |
||
| 1143 | 1150 | * type. Memoizing ensures the subfields are not repeatedly calculated, which |
| 1144 | 1151 | * saves overhead when resolving lists of values. |
| 1145 | 1152 | * |
| 1146 | - * @param object $fieldNodes |
|
| 1153 | + * @param FieldNode[] $fieldNodes |
|
| 1147 | 1154 | */ |
| 1148 | 1155 | private function collectSubFields(ObjectType $returnType, $fieldNodes) : ArrayObject |
| 1149 | 1156 | { |
@@ -1233,7 +1240,7 @@ discard block |
||
| 1233 | 1240 | * |
| 1234 | 1241 | * @param (string|Promise)[] $assoc |
| 1235 | 1242 | * |
| 1236 | - * @return mixed |
|
| 1243 | + * @return Promise |
|
| 1237 | 1244 | */ |
| 1238 | 1245 | private function promiseForAssocArray(array $assoc) |
| 1239 | 1246 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * @param object|null $value |
|
| 234 | + * @param null|stdClass $value |
|
| 235 | 235 | * @param Error[] $errors |
| 236 | 236 | */ |
| 237 | 237 | private function finishExecute($value, array $errors) : ExecutionResult |
@@ -263,6 +263,7 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | /** |
| 265 | 265 | * @internal |
| 266 | + * @param Error $error |
|
| 266 | 267 | */ |
| 267 | 268 | public function addError($error) |
| 268 | 269 | { |
@@ -566,7 +567,7 @@ discard block |
||
| 566 | 567 | * @param string[] $path |
| 567 | 568 | * @param string[]|null $nullFence |
| 568 | 569 | * |
| 569 | - * @return mixed |
|
| 570 | + * @return Generator |
|
| 570 | 571 | */ |
| 571 | 572 | private function completeValue(CoroutineContext $ctx, Type $type, $value, array $path, ?array $nullFence) |
| 572 | 573 | { |
@@ -904,7 +905,7 @@ discard block |
||
| 904 | 905 | /** |
| 905 | 906 | * @param InterfaceType|UnionType $abstractType |
| 906 | 907 | * |
| 907 | - * @return Generator|ObjectType|Type|null |
|
| 908 | + * @return Generator |
|
| 908 | 909 | */ |
| 909 | 910 | private function resolveTypeSlow(CoroutineContext $ctx, $value, AbstractType $abstractType) |
| 910 | 911 | { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * @param string|NodeList|Location|Node|(Node|NodeList|Location)[] $value |
|
| 66 | + * @param Node $value |
|
| 67 | 67 | * |
| 68 | 68 | * @return string|NodeList|Location|Node |
| 69 | 69 | */ |
@@ -574,6 +574,8 @@ discard block |
||
| 574 | 574 | * Reads a block string token from the source file. |
| 575 | 575 | * |
| 576 | 576 | * """("?"?(\\"""|\\(?!=""")|[^"\\]))*""" |
| 577 | + * @param integer $line |
|
| 578 | + * @param integer $col |
|
| 577 | 579 | */ |
| 578 | 580 | private function readBlockString($line, $col, Token $prev) |
| 579 | 581 | { |
@@ -643,6 +645,9 @@ discard block |
||
| 643 | 645 | ); |
| 644 | 646 | } |
| 645 | 647 | |
| 648 | + /** |
|
| 649 | + * @param integer $position |
|
| 650 | + */ |
|
| 646 | 651 | private function assertValidStringCharacterCode($code, $position) |
| 647 | 652 | { |
| 648 | 653 | // SourceCharacter |
@@ -655,6 +660,9 @@ discard block |
||
| 655 | 660 | } |
| 656 | 661 | } |
| 657 | 662 | |
| 663 | + /** |
|
| 664 | + * @param integer $position |
|
| 665 | + */ |
|
| 658 | 666 | private function assertValidBlockStringCharacterCode($code, $position) |
| 659 | 667 | { |
| 660 | 668 | // SourceCharacter |