Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk committed Aug 14, 2023
1 parent 3d815d9 commit ecfb671
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/Type/Registry/DefaultStandardTypeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use GraphQL\Type\Definition\FloatType;
use GraphQL\Type\Definition\IDType;
use GraphQL\Type\Definition\IntType;
use GraphQL\Type\Definition\ListOfType;
use GraphQL\Type\Definition\NonNull;
use GraphQL\Type\Definition\ScalarType;
use GraphQL\Type\Definition\StringType;
use GraphQL\Type\Definition\Type;
Expand Down
3 changes: 0 additions & 3 deletions src/Type/Registry/StandardTypeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

use GraphQL\Error\InvariantViolation;
use GraphQL\Type\Definition\Directive;
use GraphQL\Type\Definition\ListOfType;
use GraphQL\Type\Definition\NonNull;
use GraphQL\Type\Definition\NullableType;
use GraphQL\Type\Definition\ScalarType;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Introspection;
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/ASTDefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private function internalBuildType(string $typeName, Node $typeNode = null): Typ
{
$this->cache ??= [

Check failure on line 254 in src/Utils/ASTDefinitionBuilder.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (7.4)

Property GraphQL\Utils\ASTDefinitionBuilder::$cache (array<string, GraphQL\Type\Definition\NamedType&GraphQL\Type\Definition\Type>) does not accept array<int|string, GraphQL\Type\Definition\NamedType&GraphQL\Type\Definition\Type>.

Check failure on line 254 in src/Utils/ASTDefinitionBuilder.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8)

Property GraphQL\Utils\ASTDefinitionBuilder::$cache (array<string, GraphQL\Type\Definition\NamedType&GraphQL\Type\Definition\Type>) does not accept array<int|string, GraphQL\Type\Definition\NamedType&GraphQL\Type\Definition\Type>.
...$this->typeRegistry->introspection()->getTypes(),
...$this->typeRegistry->standardTypes()
...$this->typeRegistry->standardTypes(),
];

if (isset($this->cache[$typeName])) {
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/BuildClientSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function buildSchema(): Schema

$builtInTypes = [
...$this->typeRegistry->standardTypes(),
...$this->typeRegistry->introspection()->getTypes()
...$this->typeRegistry->introspection()->getTypes(),
];

foreach ($schemaIntrospection['types'] as $typeIntrospection) {
Expand Down
8 changes: 3 additions & 5 deletions tests/MultipleSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace GraphQL\Tests;

use GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter;
use GraphQL\Executor\Promise\Promise;
use GraphQL\GraphQL;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
Expand All @@ -27,7 +25,7 @@ public function testMultipleSchemasWithCustomIntType(): void
self::assertNotSame($schema1->getType('Int'), $schema2->getType('Int'));
}

private function createSchema() : Schema
private function createSchema(): Schema
{
$typeRegistry = new DefaultStandardTypeRegistry(
CustomIntType::class
Expand All @@ -38,7 +36,7 @@ private function createSchema() : Schema
'fields' => [
'count' => [
'type' => Type::nonNull($typeRegistry->int()),

Check failure on line 38 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (7.4)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 38 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 38 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.1)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 38 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.2)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.
'resolve' => fn() => 1,
'resolve' => fn () => 1,
],
],
]);
Expand All @@ -48,6 +46,6 @@ private function createSchema() : Schema
'query' => $query,
]);

return new Schema($config) ;
return new Schema($config);

Check failure on line 49 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (7.4)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 49 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 49 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.1)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.

Check failure on line 49 in tests/MultipleSchemaTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.2)

Method GraphQL\Tests\MultipleSchemaTest::createSchema() throws checked exception GraphQL\Error\InvariantViolation but it's missing from the PHPDoc @throws tag.
}
}

0 comments on commit ecfb671

Please sign in to comment.