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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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