Skip to content

Commit 40c000b

Browse files
committed
use shorthand, formatting
1 parent 60bffe6 commit 40c000b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/Executor/TestClasses/SpyValidationCacheAdapter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ final class SpyValidationCacheAdapter extends PsrValidationCacheAdapter
1515
public function isValidated(Schema $schema, DocumentNode $ast): bool
1616
{
1717
$this->isValidatedCalls++;
18+
1819
return parent::isValidated($schema, $ast);
1920
}
2021

2122
public function markValidated(Schema $schema, DocumentNode $ast): void
2223
{
2324
$this->markValidatedCalls++;
25+
2426
parent::markValidated($schema, $ast);
2527
}
2628
}

tests/Executor/ValidationWithCacheTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
66
use GraphQL\Deferred;
77
use GraphQL\GraphQL;
8-
use GraphQL\Language\AST\DocumentNode;
98
use GraphQL\Tests\Executor\TestClasses\Cat;
109
use GraphQL\Tests\Executor\TestClasses\Dog;
1110
use GraphQL\Tests\Executor\TestClasses\SpyValidationCacheAdapter;
12-
use GraphQL\Tests\PsrValidationCacheAdapter;
1311
use GraphQL\Type\Definition\InterfaceType;
1412
use GraphQL\Type\Definition\ObjectType;
1513
use GraphQL\Type\Definition\Type;
@@ -28,7 +26,7 @@ public function testIsValidationCachedWithAdapter(): void
2826
$petType = new InterfaceType([
2927
'name' => 'Pet',
3028
'fields' => [
31-
'name' => ['type' => Type::string()],
29+
'name' => Type::string(),
3230
],
3331
]);
3432

@@ -37,8 +35,8 @@ public function testIsValidationCachedWithAdapter(): void
3735
'interfaces' => [$petType],
3836
'isTypeOf' => static fn ($obj): Deferred => new Deferred(static fn (): bool => $obj instanceof Dog),
3937
'fields' => [
40-
'name' => ['type' => Type::string()],
41-
'woofs' => ['type' => Type::boolean()],
38+
'name' => Type::string(),
39+
'woofs' => Type::boolean(),
4240
],
4341
]);
4442

@@ -47,8 +45,8 @@ public function testIsValidationCachedWithAdapter(): void
4745
'interfaces' => [$petType],
4846
'isTypeOf' => static fn ($obj): Deferred => new Deferred(static fn (): bool => $obj instanceof Cat),
4947
'fields' => [
50-
'name' => ['type' => Type::string()],
51-
'meows' => ['type' => Type::boolean()],
48+
'name' => Type::string(),
49+
'meows' => Type::boolean(),
5250
],
5351
]);
5452

0 commit comments

Comments
 (0)