@@ -84,7 +84,7 @@ |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | - * @return Field[]|Query[] |
|
| 87 | + * @return Query[] |
|
| 88 | 88 | */ |
| 89 | 89 | public function getFields() |
| 90 | 90 | { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | - * @return Field[]|Query[] |
|
| 31 | + * @return Field[] |
|
| 32 | 32 | */ |
| 33 | 33 | public function getFields() |
| 34 | 34 | { |
@@ -223,6 +223,9 @@ discard block |
||
| 223 | 223 | return $this; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | + /** |
|
| 227 | + * @param string $name |
|
| 228 | + */ |
|
| 226 | 229 | public function getVariable($name) |
| 227 | 230 | { |
| 228 | 231 | return $this->hasVariable($name) ? $this->variables[$name] : null; |
@@ -266,7 +269,7 @@ discard block |
||
| 266 | 269 | } |
| 267 | 270 | |
| 268 | 271 | /** |
| 269 | - * @return array|VariableReference[] |
|
| 272 | + * @return VariableReference[] |
|
| 270 | 273 | */ |
| 271 | 274 | public function getVariableReferences() |
| 272 | 275 | { |
@@ -149,6 +149,9 @@ discard block |
||
| 149 | 149 | return [$this->getAlias($query) => $value]; |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | + /** |
|
| 153 | + * @return AstFieldInterface |
|
| 154 | + */ |
|
| 152 | 155 | protected function resolveField(FieldInterface $field, AstFieldInterface $ast, $parentValue = null, $fromObject = false) |
| 153 | 156 | { |
| 154 | 157 | try { |
@@ -220,6 +223,9 @@ discard block |
||
| 220 | 223 | } |
| 221 | 224 | } |
| 222 | 225 | |
| 226 | + /** |
|
| 227 | + * @param \Youshido\GraphQL\Parser\Ast\Interfaces\ValueInterface $argumentValue |
|
| 228 | + */ |
|
| 223 | 229 | private function prepareArgumentValue($argumentValue, AbstractType $argumentType, Request $request) |
| 224 | 230 | { |
| 225 | 231 | switch ($argumentType->getKind()) { |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | - * @param $key |
|
| 150 | + * @param string $key |
|
| 151 | 151 | * @param null $defaultValue |
| 152 | 152 | * |
| 153 | 153 | * @return callable|mixed|null |
@@ -157,6 +157,9 @@ discard block |
||
| 157 | 157 | return $this->has($key) ? $this->data[$key] : $defaultValue; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | + /** |
|
| 161 | + * @param string $key |
|
| 162 | + */ |
|
| 160 | 163 | public function set($key, $value) |
| 161 | 164 | { |
| 162 | 165 | $this->data[$key] = $value; |
@@ -38,6 +38,9 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | private $directiveList; |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param \Youshido\GraphQL\Schema\AbstractSchema $contextObject |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct(array $configData, $contextObject = null, $finalClass = false) |
| 42 | 45 | { |
| 43 | 46 | $this->typesList = new SchemaTypesList(); |
@@ -31,6 +31,9 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | protected $configCache = []; |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @return FieldConfig |
|
| 36 | + */ |
|
| 34 | 37 | public function getConfig() |
| 35 | 38 | { |
| 36 | 39 | return $this->config; |
@@ -41,6 +44,11 @@ discard block |
||
| 41 | 44 | return $this->getConfigValue('description'); |
| 42 | 45 | } |
| 43 | 46 | |
| 47 | + /** |
|
| 48 | + * @param string $key |
|
| 49 | + * |
|
| 50 | + * @return callable |
|
| 51 | + */ |
|
| 44 | 52 | protected function getConfigValue($key, $defaultValue = null) |
| 45 | 53 | { |
| 46 | 54 | if (\array_key_exists($key, $this->configCache)) { |
@@ -23,14 +23,27 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * @param Field|string $field |
| 25 | 25 | * @param array $fieldInfo |
| 26 | + * @return Traits\FieldsAwareConfigTrait |
|
| 26 | 27 | */ |
| 27 | 28 | public function addField($field, $fieldInfo = null); |
| 28 | 29 | |
| 30 | + /** |
|
| 31 | + * @return Field |
|
| 32 | + */ |
|
| 29 | 33 | public function getField($name); |
| 30 | 34 | |
| 35 | + /** |
|
| 36 | + * @return Traits\FieldsAwareConfigTrait |
|
| 37 | + */ |
|
| 31 | 38 | public function removeField($name); |
| 32 | 39 | |
| 40 | + /** |
|
| 41 | + * @return boolean |
|
| 42 | + */ |
|
| 33 | 43 | public function hasField($name); |
| 34 | 44 | |
| 45 | + /** |
|
| 46 | + * @return Field[] |
|
| 47 | + */ |
|
| 35 | 48 | public function getFields(); |
| 36 | 49 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | * Fragments (anonymous and named), and Fields. The core of the function is simple: recurse until we hit the base |
| 100 | 100 | * case of a Field and yield that back up to the visitor up in `doVisit`. |
| 101 | 101 | * |
| 102 | - * @param Field|Query|\Youshido\GraphQL\Parser\Ast\Interfaces\FragmentInterface $queryNode |
|
| 102 | + * @param Query $queryNode |
|
| 103 | 103 | * @param FieldInterface $currentLevelAST |
| 104 | 104 | * |
| 105 | 105 | * @return \Generator |