Skip to content

Commit

Permalink
Merge 036da41 into 5289a54
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Jan 4, 2021
2 parents 5289a54 + 036da41 commit 3a71806
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/Type/Definition/ListOfType.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ public function getOfType()
return Schema::resolveType($this->ofType);
}

/**
* @return ObjectType|InterfaceType|UnionType|ScalarType|InputObjectType|EnumType|(Type&WrappingType)
*/
public function getWrappedType(bool $recurse = false) : Type
{
$type = $this->getOfType();
Expand Down
12 changes: 3 additions & 9 deletions src/Type/Definition/NonNull.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@

namespace GraphQL\Type\Definition;

use GraphQL\Error\InvariantViolation;
use GraphQL\Type\Schema;
use function is_callable;

class NonNull extends Type implements WrappingType, OutputType, InputType
{
/** @var callable|(NullableType&Type) */
/** @var callable():(NullableType&Type)|(NullableType&Type) */
private $ofType;

/**
* code sniffer doesn't understand this syntax. Pr with a fix here: waiting on https://github.com/squizlabs/PHP_CodeSniffer/pull/2919
* phpcs:disable Squiz.Commenting.FunctionComment.SpacingAfterParamType
* @param (NullableType&Type)|callable $type
* @param callable():(NullableType &Type)|(NullableType&Type) $type
*/
public function __construct($type)
{
/** @var Type&NullableType $nullableType*/
$nullableType = $type;
$this->ofType = $nullableType;
$this->ofType = $type;
}

public function toString() : string
Expand Down

0 comments on commit 3a71806

Please sign in to comment.