Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia authored and actions-user committed Jan 20, 2022
1 parent d844685 commit d106b33
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 50 deletions.
6 changes: 3 additions & 3 deletions src/Executor/ReferenceExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ protected function completeLeafValue(LeafType $returnType, &$result)
* Complete a value of an abstract type by determining the runtime object type
* of that value, then complete the value for that type.
*
* @param AbstractType&Type $returnType
* @param AbstractType|Type $returnType
* @param ArrayObject<int, FieldNode> $fieldNodes
* @param array<string|int> $path
* @param array<mixed> $result
Expand Down Expand Up @@ -1078,7 +1078,7 @@ protected function completeAbstractValue(
*
* @param mixed|null $value
* @param mixed|null $contextValue
* @param AbstractType&Type $abstractType
* @param AbstractType|Type $abstractType
*
* @return Promise|Type|string|null
*/
Expand Down Expand Up @@ -1350,7 +1350,7 @@ protected function promiseForAssocArray(array $assoc): Promise

/**
* @param mixed $runtimeTypeOrName
* @param AbstractType&Type $returnType
* @param AbstractType|Type $returnType
* @param mixed $result
*/
protected function ensureValidRuntimeType(
Expand Down
12 changes: 6 additions & 6 deletions src/Language/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ private function parseDocument(): DocumentNode
}

/**
* @return DefinitionNode&Node
* @return DefinitionNode|Node
*/
private function parseDefinition(): DefinitionNode
{
Expand Down Expand Up @@ -524,7 +524,7 @@ private function parseDefinition(): DefinitionNode
}

/**
* @return ExecutableDefinitionNode&Node
* @return ExecutableDefinitionNode|Node
*/
private function parseExecutableDefinition(): ExecutableDefinitionNode
{
Expand All @@ -548,7 +548,7 @@ private function parseExecutableDefinition(): ExecutableDefinitionNode
// Implements the parsing rules in the Operations section.

/**
* @return OperationDefinitionNode&Node
* @return OperationDefinitionNode|Node
*/
private function parseOperationDefinition(): OperationDefinitionNode
{
Expand Down Expand Up @@ -660,7 +660,7 @@ private function parseSelectionSet(): SelectionSetNode
}

/**
* @return SelectionNode&Node
* @return SelectionNode|Node
*/
private function parseSelection(): SelectionNode
{
Expand Down Expand Up @@ -1023,7 +1023,7 @@ private function parseNamedType(): NamedTypeNode
// Implements the parsing rules in the Type Definition section.

/**
* @return TypeSystemDefinitionNode&Node
* @return TypeSystemDefinitionNode|Node
*/
private function parseTypeSystemDefinition(): TypeSystemDefinitionNode
{
Expand Down Expand Up @@ -1404,7 +1404,7 @@ function (): InputValueDefinitionNode {
}

/**
* @return TypeExtensionNode&Node
* @return TypeExtensionNode|Node
*/
private function parseTypeExtension(): TypeExtensionNode
{
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Definition/Argument.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Argument

public ?string $description;

/** @var Type&InputType */
/** @var Type|InputType */
private Type $type;

public ?InputValueDefinitionNode $astNode;
Expand Down Expand Up @@ -79,7 +79,7 @@ public static function listFromConfig(iterable $config): array
}

/**
* @return Type&InputType
* @return Type|InputType
*/
public function getType(): Type
{
Expand All @@ -103,7 +103,7 @@ public function isRequired(): bool
}

/**
* @param Type&NamedType $parentType
* @param Type|NamedType $parentType
*/
public function assertValid(FieldDefinition $parentField, Type $parentType): void
{
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Definition/FieldDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FieldDefinition
*/
public array $config;

/** @var Type&OutputType */
/** @var Type|OutputType */
private Type $type;

/**
Expand Down Expand Up @@ -184,7 +184,7 @@ public function getName(): string
}

/**
* @return Type&OutputType
* @return Type|OutputType
*/
public function getType(): Type
{
Expand All @@ -197,7 +197,7 @@ public function isDeprecated(): bool
}

/**
* @param Type&NamedType $parentType
* @param Type|NamedType $parentType
*
* @throws InvariantViolation
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Definition/InputObjectField.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class InputObjectField

public ?string $description;

/** @var Type&InputType */
/** @var Type|InputType */
private Type $type;

public ?InputValueDefinitionNode $astNode;
Expand All @@ -57,7 +57,7 @@ public function __construct(array $config)
}

/**
* @return Type&InputType
* @return Type|InputType
*/
public function getType(): Type
{
Expand All @@ -81,7 +81,7 @@ public function isRequired(): bool
}

/**
* @param Type&NamedType $parentType
* @param Type|NamedType $parentType
*
* @throws InvariantViolation
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Definition/LeafType.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function parseValue($value);
*
* Should throw an exception with a client friendly message on invalid value nodes, @see ClientAware.
*
* @param ValueNode&Node $valueNode
* @param ValueNode|Node $valueNode
* @param array<string, mixed>|null $variables
*
* @return mixed
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Definition/NonNull.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function toString(): string
}

/**
* @return NullableType&Type
* @return NullableType|Type
*/
public function getWrappedType(): Type
{
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Definition/QueryPlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private function analyzeQueryPlan(ObjectType $parentType, iterable $fieldNodes):
}

/**
* @param Type&NamedType $parentType
* @param Type|NamedType $parentType
* @param array<string, mixed> $implementors
*
* @throws Error
Expand Down Expand Up @@ -229,8 +229,8 @@ private function analyzeSubFields(Type $type, SelectionSetNode $selectionSet, ar
}

/**
* @param Type&NamedType $parentType
* @param Type&NamedType $type
* @param Type|NamedType $parentType
* @param Type|NamedType $type
* @param array<mixed> $fields
* @param array<mixed> $subfields
* @param array<string, mixed> $implementors
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Definition/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static function isAbstractType($type): bool
}

/**
* @return Type&NullableType
* @return Type|NullableType
*
* @api
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Definition/WrappingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function getWrappedType(): Type;
/**
* Return the innermost wrapped type, which is guaranteed to be a named type.
*
* @return Type&NamedType
* @return Type|NamedType
*/
public function getInnermostType(): NamedType;
}
2 changes: 1 addition & 1 deletion src/Type/Introspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ enumValues(includeDeprecated: true) {
}

/**
* @param Type&NamedType $type
* @param Type|NamedType $type
*/
public static function isIntrospectionType(NamedType $type): bool
{
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public static function resolveType($type): Type
*
* This operation requires full schema scan. Do not use in production environment.
*
* @param AbstractType&Type $abstractType
* @param AbstractType|Type $abstractType
*
* @return array<ObjectType>
*
Expand Down Expand Up @@ -465,8 +465,8 @@ private function collectImplementations(): array
/**
* Returns true if the given type is a sub type of the given abstract type.
*
* @param AbstractType&Type $abstractType
* @param ImplementingType&Type $maybeSubType
* @param AbstractType|Type $abstractType
* @param ImplementingType|Type $maybeSubType
*
* @api
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Type/SchemaValidationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ private function getDirectives(object $object): NodeList

/**
* @param ObjectType|InterfaceType $type
* @param Type &NamedType $shouldBeInterface
* @param Type|NamedType $shouldBeInterface
*/
private function getImplementsInterfaceNode(ImplementingType $type, NamedType $shouldBeInterface): ?NamedTypeNode
{
Expand All @@ -656,7 +656,7 @@ private function getImplementsInterfaceNode(ImplementingType $type, NamedType $s

/**
* @param ObjectType|InterfaceType $type
* @param Type &NamedType $shouldBeInterface
* @param Type|NamedType $shouldBeInterface
*
* @return array<int, NamedTypeNode>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/AST.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static function toArray(Node $node): array
* | null | NullValue |
*
* @param mixed $value
* @param InputType&Type $type
* @param InputType|Type $type
*
* @return (ValueNode&Node)|null
*
Expand Down Expand Up @@ -459,7 +459,7 @@ public static function valueFromAST(?ValueNode $valueNode, Type $type, ?array $v
* Returns true if the provided valueNode is a variable which is not defined
* in the set of variables.
*
* @param ValueNode&Node $valueNode
* @param ValueNode|Node $valueNode
* @param array<string, mixed>|null $variables
*/
private static function isMissingVariable(ValueNode $valueNode, ?array $variables): bool
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/ASTDefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private function makeInputValues(NodeList $values): array
// Note: While this could make assertions to get the correctly typed
// value, that would throw immediately while type system validation
// with validateSchema() will produce more actionable results.
/** @var Type&InputType $type */
/** @var Type|InputType $type */
$type = $this->buildWrappedType($value->type);

$config = [
Expand Down Expand Up @@ -209,7 +209,7 @@ private function internalBuildType(string $typeName, ?Node $typeNode = null): Ty
}

/**
* @param TypeDefinitionNode&Node $def
* @param TypeDefinitionNode|Node $def
*
* @throws Error
*
Expand Down Expand Up @@ -274,7 +274,7 @@ public function buildField(FieldDefinitionNode $field): array
// Note: While this could make assertions to get the correctly typed
// value, that would throw immediately while type system validation
// with validateSchema() will produce more actionable results.
/** @var OutputType&Type $type */
/** @var OutputType|Type $type */
$type = $this->buildWrappedType($field->type);

return [
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/BreakingChangesFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static function findTypesThatChangedKind(
}

/**
* @param Type&NamedType $type
* @param Type|NamedType $type
*/
private static function typeKindName(NamedType $type): string
{
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/BuildClientSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private function getType(array $typeRef): Type
}

/**
* @return NamedType&Type
* @return NamedType|Type
*/
private function getNamedType(string $typeName): NamedType
{
Expand All @@ -206,7 +206,7 @@ public static function invalidOrIncompleteIntrospectionResult(array $type): Inva
/**
* @param array<string, mixed> $typeRef
*
* @return Type&InputType
* @return Type|InputType
*/
private function getInputType(array $typeRef): InputType
{
Expand Down Expand Up @@ -256,7 +256,7 @@ public function getInterfaceType(array $typeRef): InterfaceType
/**
* @param array<string, mixed> $type
*
* @return Type&NamedType
* @return Type|NamedType
*/
private function buildType(array $type): NamedType
{
Expand Down
8 changes: 4 additions & 4 deletions src/Utils/SchemaExtender.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SchemaExtender
protected static ASTDefinitionBuilder $astBuilder;

/**
* @param Type&NamedType $type
* @param Type|NamedType $type
*
* @return array<TypeExtensionNode>|null
*/
Expand All @@ -69,7 +69,7 @@ protected static function extensionASTNodes(NamedType $type): ?array
}

/**
* @param Type&NamedType $type
* @param Type|NamedType $type
*
* @throws Error
*/
Expand Down Expand Up @@ -459,9 +459,9 @@ protected static function isSpecifiedScalarType(Type $type): bool
/**
* @template T of Type
*
* @param T&NamedType $type
* @param T|NamedType $type
*
* @return T&NamedType
* @return T|NamedType
*/
protected static function extendNamedType(Type $type): Type
{
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Value
* Given a type and any value, return a runtime value coerced to match the type.
*
* @param mixed $value
* @param InputType&Type $type
* @param InputType|Type $type
* @phpstan-param Path|null $path
*
* @phpstan-return CoercedValue|CoercedErrors
Expand Down
4 changes: 2 additions & 2 deletions src/Validator/Rules/PossibleFragmentSpreads.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public function getVisitor(ValidationContext $context): array
}

/**
* @param CompositeType&Type $fragType
* @param CompositeType&Type $parentType
* @param CompositeType|Type $fragType
* @param CompositeType|Type $parentType
*/
protected function doTypesOverlap(Schema $schema, CompositeType $fragType, CompositeType $parentType): bool
{
Expand Down

0 comments on commit d106b33

Please sign in to comment.