Consistent docblock comments for arrays

This commit is contained in:
vladar 2016-11-19 06:19:41 +07:00
parent 8d696edee5
commit 5aad8b596b
16 changed files with 24 additions and 21 deletions

View File

@ -2,6 +2,7 @@
namespace GraphQL\Executor; namespace GraphQL\Executor;
use GraphQL\Error\Error; use GraphQL\Error\Error;
use GraphQL\Language\AST\FragmentDefinitionNode;
use GraphQL\Language\AST\OperationDefinitionNode; use GraphQL\Language\AST\OperationDefinitionNode;
use GraphQL\Schema; use GraphQL\Schema;
@ -19,7 +20,7 @@ class ExecutionContext
public $schema; public $schema;
/** /**
* @var array<string, FragmentDefinitionNode> * @var FragmentDefinitionNode[]
*/ */
public $fragments; public $fragments;

View File

@ -16,12 +16,12 @@ class FieldNode extends Node implements SelectionNode
public $alias; public $alias;
/** /**
* @var array<ArgumentNode>|null * @var ArgumentNode[]|null
*/ */
public $arguments; public $arguments;
/** /**
* @var array<DirectiveNode>|null * @var DirectiveNode[]|null
*/ */
public $directives; public $directives;

View File

@ -16,7 +16,7 @@ class FragmentDefinitionNode extends Node implements DefinitionNode, HasSelectio
public $typeCondition; public $typeCondition;
/** /**
* @var array<DirectiveNode> * @var DirectiveNode[]
*/ */
public $directives; public $directives;

View File

@ -11,7 +11,7 @@ class FragmentSpreadNode extends Node implements SelectionNode
public $name; public $name;
/** /**
* @var array<DirectiveNode> * @var DirectiveNode[]
*/ */
public $directives; public $directives;
} }

View File

@ -11,7 +11,7 @@ class InlineFragmentNode extends Node implements SelectionNode
public $typeCondition; public $typeCondition;
/** /**
* @var array<DirectiveNode>|null * @var DirectiveNode[]|null
*/ */
public $directives; public $directives;

View File

@ -7,7 +7,7 @@ class ListValueNode extends Node implements ValueNode
public $kind = NodeType::LST; public $kind = NodeType::LST;
/** /**
* @var array<ValueNode> * @var ValueNode[]
*/ */
public $values; public $values;
} }

View File

@ -6,7 +6,7 @@ class ObjectValueNode extends Node implements ValueNode
public $kind = NodeType::OBJECT; public $kind = NodeType::OBJECT;
/** /**
* @var array<ObjectFieldNode> * @var ObjectFieldNode[]
*/ */
public $fields; public $fields;
} }

View File

@ -19,12 +19,12 @@ class OperationDefinitionNode extends Node implements DefinitionNode, HasSelecti
public $operation; public $operation;
/** /**
* @var array<VariableDefinitionNode> * @var VariableDefinitionNode[]
*/ */
public $variableDefinitions; public $variableDefinitions;
/** /**
* @var array<DirectiveNode> * @var DirectiveNode[]
*/ */
public $directives; public $directives;

View File

@ -6,7 +6,7 @@ class SelectionSetNode extends Node
public $kind = NodeType::SELECTION_SET; public $kind = NodeType::SELECTION_SET;
/** /**
* @var array<SelectionNode> * @var SelectionNode[]
*/ */
public $selections; public $selections;
} }

View File

@ -404,7 +404,7 @@ class Parser
} }
/** /**
* @return array<VariableDefinitionNode> * @return VariableDefinitionNode[]
*/ */
function parseVariableDefinitions() function parseVariableDefinitions()
{ {
@ -507,7 +507,7 @@ class Parser
} }
/** /**
* @return array<ArgumentNode> * @return ArgumentNode[]
*/ */
function parseArguments() function parseArguments()
{ {
@ -752,7 +752,7 @@ class Parser
// Implements the parsing rules in the Directives section. // Implements the parsing rules in the Directives section.
/** /**
* @return array<DirectiveNode> * @return DirectiveNode[]
*/ */
function parseDirectives() function parseDirectives()
{ {

View File

@ -62,7 +62,7 @@ class Schema
protected $directives; protected $directives;
/** /**
* @var array<string, Type> * @var Type[]
*/ */
protected $typeMap; protected $typeMap;

View File

@ -10,7 +10,7 @@ use GraphQL\Utils;
class InterfaceType extends Type implements AbstractType, OutputType, CompositeType class InterfaceType extends Type implements AbstractType, OutputType, CompositeType
{ {
/** /**
* @var array<string,FieldDefinition> * @var FieldDefinition[]
*/ */
private $fields; private $fields;

View File

@ -47,7 +47,7 @@ class ResolveInfo
public $schema; public $schema;
/** /**
* @var array<fragmentName, FragmentDefinition> * @var FragmentDefinitionNode[]
*/ */
public $fragments; public $fragments;

View File

@ -16,7 +16,7 @@ class UnionType extends Type implements AbstractType, OutputType, CompositeType
private $types; private $types;
/** /**
* @var array<string, ObjectType> * @var ObjectType[]
*/ */
private $possibleTypeNames; private $possibleTypeNames;

View File

@ -3,6 +3,7 @@ namespace GraphQL\Validator\Rules;
use GraphQL\Error\Error; use GraphQL\Error\Error;
use GraphQL\Language\AST\ArgumentNode;
use GraphQL\Language\AST\DirectiveNode; use GraphQL\Language\AST\DirectiveNode;
use GraphQL\Language\AST\FieldNode; use GraphQL\Language\AST\FieldNode;
use GraphQL\Language\AST\FragmentSpreadNode; use GraphQL\Language\AST\FragmentSpreadNode;
@ -373,8 +374,9 @@ class OverlappingFieldsCanBeMerged
} }
/** /**
* @param Array<ArgumentNode | DirectiveNode> $pairs1 * @param ArgumentNode[]|DirectiveNode[] $arguments1
* @param Array<ArgumentNode | DirectiveNode> $pairs2 * @param ArgumentNode[]|DirectiveNode[] $arguments2
*
* @return bool|string * @return bool|string
*/ */
private function sameArguments(array $arguments1, array $arguments2) private function sameArguments(array $arguments1, array $arguments2)

View File

@ -48,7 +48,7 @@ class ValidationContext
private $errors; private $errors;
/** /**
* @var array<string, FragmentDefinitionNode> * @var FragmentDefinitionNode[]
*/ */
private $fragments; private $fragments;