Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk authored and github-actions[bot] committed May 24, 2022
1 parent 03855e1 commit 7579b5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 3 additions & 7 deletions src/Type/Definition/TypeReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace GraphQL\Type\Definition;

use GraphQL\Error\Error;

class TypeReference extends Type implements NullableType, NamedType
{
public string $name;
Expand All @@ -15,17 +13,15 @@ public function __construct(string $name)
$this->name = $name;
}

public function assertValid() : void
public function assertValid(): void
{

}

public function isBuiltInType() : bool
public function isBuiltInType(): bool
{

}

public function toString() : string
public function toString(): string
{
return $this->name;
}
Expand Down
3 changes: 1 addition & 2 deletions src/Type/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private function collectAllTypes(): array
*/
private function resolveTypeReference(Type $type, array &$typeMap): Type
{
if (!$type instanceof TypeReference) {
if (! $type instanceof TypeReference) {
return $type;
}

Expand Down Expand Up @@ -333,7 +333,6 @@ public function getType(string $name): ?Type
return $this->getType($name);
}


return $this->resolvedTypes[$name];
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Type/TypeReferenceTypeLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace GraphQL\Tests\Type;

use GraphQL\Error\InvariantViolation;
use GraphQL\Type\Definition\InputObjectType;
use GraphQL\Type\Definition\InterfaceType;
use GraphQL\Type\Definition\ObjectType;
Expand All @@ -24,15 +23,15 @@ public function setUp(): void
'fields' => [
'id' => Type::string(),
],
'resolveType' => static fn() : ?ObjectType => null,
'resolveType' => static fn (): ?ObjectType => null,
]),
'Content' => new InterfaceType([
'name' => 'Content',
'fields' => [
'title' => Type::string(),
'body' => Type::string(),
],
'resolveType' => static fn() : ?ObjectType => null,
'resolveType' => static fn (): ?ObjectType => null,
]),
'BlogStory' => new ObjectType([
'name' => 'BlogStory',
Expand Down

0 comments on commit 7579b5d

Please sign in to comment.