diff --git a/tests/Executor/DeferredFieldsTest.php b/tests/Executor/DeferredFieldsTest.php index cb33ccb2c..2d82cad72 100644 --- a/tests/Executor/DeferredFieldsTest.php +++ b/tests/Executor/DeferredFieldsTest.php @@ -61,7 +61,7 @@ final class DeferredFieldsTest extends TestCase private ObjectType $queryType; - public function setUp(): void + protected function setUp(): void { $this->storyDataSource = [ ['id' => 1, 'authorId' => 1, 'title' => 'Story #1', 'categoryIds' => [2, 3]], diff --git a/tests/Executor/ListsTest.php b/tests/Executor/ListsTest.php index 22bd68964..77b6e81f0 100644 --- a/tests/Executor/ListsTest.php +++ b/tests/Executor/ListsTest.php @@ -502,7 +502,7 @@ public function testHandlesNonNullListOfNonNullsWithArray(): void * @throws \Exception * @throws InvariantViolation */ - public function checkHandlesNonNullListOfNonNulls($testData, array $expected, int $debug = DebugFlag::NONE): void + private function checkHandlesNonNullListOfNonNulls($testData, array $expected, int $debug = DebugFlag::NONE): void { $testType = Type::nonNull(Type::listOf(Type::nonNull(Type::int()))); $this->check($testType, $testData, $expected, $debug); diff --git a/tests/Executor/NonNullTest.php b/tests/Executor/NonNullTest.php index 92c5bb291..13ec9305e 100644 --- a/tests/Executor/NonNullTest.php +++ b/tests/Executor/NonNullTest.php @@ -39,7 +39,7 @@ final class NonNullTest extends TestCase public Schema $schemaWithNonNullArg; - public function setUp(): void + protected function setUp(): void { $this->syncError = new UserError('sync'); $this->syncNonNullError = new UserError('syncNonNull'); diff --git a/tests/Executor/Promise/ReactPromiseAdapterTest.php b/tests/Executor/Promise/ReactPromiseAdapterTest.php index 1c381c3b8..d3d5acb86 100644 --- a/tests/Executor/Promise/ReactPromiseAdapterTest.php +++ b/tests/Executor/Promise/ReactPromiseAdapterTest.php @@ -22,7 +22,7 @@ final class ReactPromiseAdapterTest extends TestCase /** @var class-string */ private string $classRejectedPromise; - public function setUp(): void + protected function setUp(): void { /** @var class-string $classFulfilledPromise */ $classFulfilledPromise = class_exists('\React\Promise\FulfilledPromise') diff --git a/tests/Executor/Promise/SyncPromiseAdapterTest.php b/tests/Executor/Promise/SyncPromiseAdapterTest.php index 00d363584..51c825a98 100644 --- a/tests/Executor/Promise/SyncPromiseAdapterTest.php +++ b/tests/Executor/Promise/SyncPromiseAdapterTest.php @@ -13,7 +13,7 @@ final class SyncPromiseAdapterTest extends TestCase { private SyncPromiseAdapter $promises; - public function setUp(): void + protected function setUp(): void { $this->promises = new SyncPromiseAdapter(); } diff --git a/tests/Executor/ScopedContextTest.php b/tests/Executor/ScopedContextTest.php index 0f9cb791a..b4bfe1a57 100644 --- a/tests/Executor/ScopedContextTest.php +++ b/tests/Executor/ScopedContextTest.php @@ -24,7 +24,7 @@ final class ScopedContextTest extends TestCase /** @var array */ private array $contexts = []; - public function setUp(): void + protected function setUp(): void { $this->contexts = []; diff --git a/tests/Executor/SyncTest.php b/tests/Executor/SyncTest.php index 57f7bdef3..6223da240 100644 --- a/tests/Executor/SyncTest.php +++ b/tests/Executor/SyncTest.php @@ -28,7 +28,7 @@ final class SyncTest extends TestCase private SyncPromiseAdapter $promiseAdapter; - public function setUp(): void + protected function setUp(): void { $this->schema = new Schema([ 'query' => new ObjectType([ diff --git a/tests/Executor/TestClasses/Human.php b/tests/Executor/TestClasses/Human.php index 6f77c6d08..63ac8198f 100644 --- a/tests/Executor/TestClasses/Human.php +++ b/tests/Executor/TestClasses/Human.php @@ -4,8 +4,7 @@ final class Human { - /** @var string */ - public $name; + public string $name; public function __construct(string $name) { diff --git a/tests/Executor/TestClasses/NotSpecial.php b/tests/Executor/TestClasses/NotSpecial.php index 1aa9d4c89..c026f31d8 100644 --- a/tests/Executor/TestClasses/NotSpecial.php +++ b/tests/Executor/TestClasses/NotSpecial.php @@ -4,11 +4,9 @@ final class NotSpecial { - /** @var string */ - public $value; + public string $value; - /** @param string $value */ - public function __construct($value) + public function __construct(string $value) { $this->value = $value; } diff --git a/tests/Executor/TestClasses/NumberHolder.php b/tests/Executor/TestClasses/NumberHolder.php index a7b5a4f1a..fd34f90cd 100644 --- a/tests/Executor/TestClasses/NumberHolder.php +++ b/tests/Executor/TestClasses/NumberHolder.php @@ -4,8 +4,7 @@ final class NumberHolder { - /** @var float */ - public $theNumber; + public float $theNumber; public function __construct(float $originalNumber) { diff --git a/tests/Executor/TestClasses/Person.php b/tests/Executor/TestClasses/Person.php index 56f99eabe..99a088241 100644 --- a/tests/Executor/TestClasses/Person.php +++ b/tests/Executor/TestClasses/Person.php @@ -4,8 +4,7 @@ final class Person { - /** @var string */ - public $name; + public string $name; /** @var array|null */ public ?array $pets; diff --git a/tests/Executor/TestClasses/Special.php b/tests/Executor/TestClasses/Special.php index 9b6c99ff6..fe21fc82f 100644 --- a/tests/Executor/TestClasses/Special.php +++ b/tests/Executor/TestClasses/Special.php @@ -4,11 +4,9 @@ final class Special { - /** @var string */ - public $value; + public string $value; - /** @param string $value */ - public function __construct($value) + public function __construct(string $value) { $this->value = $value; } diff --git a/tests/Executor/UnionInterfaceTest.php b/tests/Executor/UnionInterfaceTest.php index 968cdac1e..50a448bff 100644 --- a/tests/Executor/UnionInterfaceTest.php +++ b/tests/Executor/UnionInterfaceTest.php @@ -30,7 +30,7 @@ final class UnionInterfaceTest extends TestCase public Person $john; - public function setUp(): void + protected function setUp(): void { $NamedType = new InterfaceType([ 'name' => 'Named', diff --git a/tests/Executor/VariablesTest.php b/tests/Executor/VariablesTest.php index 4a8783873..40a11d690 100644 --- a/tests/Executor/VariablesTest.php +++ b/tests/Executor/VariablesTest.php @@ -134,7 +134,7 @@ private function executeQuery(string $query, ?array $variableValues = null): Exe } /** @throws InvariantViolation */ - public function schema(): Schema + private function schema(): Schema { $ComplexScalarType = new ComplexScalar(); diff --git a/tests/PhpStan/Type/Definition/Type/IsAbstractTypeStaticMethodTypeSpecifyingExtension.php b/tests/PhpStan/Type/Definition/Type/IsAbstractTypeStaticMethodTypeSpecifyingExtension.php index e4a6aab9d..b913f72f2 100644 --- a/tests/PhpStan/Type/Definition/Type/IsAbstractTypeStaticMethodTypeSpecifyingExtension.php +++ b/tests/PhpStan/Type/Definition/Type/IsAbstractTypeStaticMethodTypeSpecifyingExtension.php @@ -16,8 +16,7 @@ final class IsAbstractTypeStaticMethodTypeSpecifyingExtension implements StaticMethodTypeSpecifyingExtension, TypeSpecifierAwareExtension { - /** @var TypeSpecifier */ - private $typeSpecifier; + private TypeSpecifier $typeSpecifier; public function getClass(): string { diff --git a/tests/PhpStan/Type/Definition/Type/IsCompositeTypeStaticMethodTypeSpecifyingExtension.php b/tests/PhpStan/Type/Definition/Type/IsCompositeTypeStaticMethodTypeSpecifyingExtension.php index 54eaf8560..1a5a97b42 100644 --- a/tests/PhpStan/Type/Definition/Type/IsCompositeTypeStaticMethodTypeSpecifyingExtension.php +++ b/tests/PhpStan/Type/Definition/Type/IsCompositeTypeStaticMethodTypeSpecifyingExtension.php @@ -16,8 +16,7 @@ final class IsCompositeTypeStaticMethodTypeSpecifyingExtension implements StaticMethodTypeSpecifyingExtension, TypeSpecifierAwareExtension { - /** @var TypeSpecifier */ - private $typeSpecifier; + private TypeSpecifier $typeSpecifier; public function getClass(): string { diff --git a/tests/PhpStan/Type/Definition/Type/IsInputTypeStaticMethodTypeSpecifyingExtension.php b/tests/PhpStan/Type/Definition/Type/IsInputTypeStaticMethodTypeSpecifyingExtension.php index d4bb5cd45..f369bbc2a 100644 --- a/tests/PhpStan/Type/Definition/Type/IsInputTypeStaticMethodTypeSpecifyingExtension.php +++ b/tests/PhpStan/Type/Definition/Type/IsInputTypeStaticMethodTypeSpecifyingExtension.php @@ -16,8 +16,7 @@ final class IsInputTypeStaticMethodTypeSpecifyingExtension implements StaticMethodTypeSpecifyingExtension, TypeSpecifierAwareExtension { - /** @var TypeSpecifier */ - private $typeSpecifier; + private TypeSpecifier $typeSpecifier; public function getClass(): string { diff --git a/tests/PhpStan/Type/Definition/Type/IsOutputTypeStaticMethodTypeSpecifyingExtension.php b/tests/PhpStan/Type/Definition/Type/IsOutputTypeStaticMethodTypeSpecifyingExtension.php index 3dec70656..bede3665f 100644 --- a/tests/PhpStan/Type/Definition/Type/IsOutputTypeStaticMethodTypeSpecifyingExtension.php +++ b/tests/PhpStan/Type/Definition/Type/IsOutputTypeStaticMethodTypeSpecifyingExtension.php @@ -16,8 +16,7 @@ final class IsOutputTypeStaticMethodTypeSpecifyingExtension implements StaticMethodTypeSpecifyingExtension, TypeSpecifierAwareExtension { - /** @var TypeSpecifier */ - private $typeSpecifier; + private TypeSpecifier $typeSpecifier; public function getClass(): string { diff --git a/tests/Server/QueryExecutionTest.php b/tests/Server/QueryExecutionTest.php index 998a3782d..cb8fd3f34 100644 --- a/tests/Server/QueryExecutionTest.php +++ b/tests/Server/QueryExecutionTest.php @@ -23,7 +23,7 @@ final class QueryExecutionTest extends ServerTestCase private ServerConfig $config; - public function setUp(): void + protected function setUp(): void { $schema = $this->buildSchema(); $this->config = ServerConfig::create() diff --git a/tests/Server/StandardServerTest.php b/tests/Server/StandardServerTest.php index 4c5f7b909..5fbd4e709 100644 --- a/tests/Server/StandardServerTest.php +++ b/tests/Server/StandardServerTest.php @@ -21,7 +21,7 @@ final class StandardServerTest extends ServerTestCase /** @var ServerConfig */ private $config; - public function setUp(): void + protected function setUp(): void { $schema = $this->buildSchema(); $this->config = ServerConfig::create() diff --git a/tests/TestCaseBase.php b/tests/TestCaseBase.php index 5da54f382..3c7d6a019 100644 --- a/tests/TestCaseBase.php +++ b/tests/TestCaseBase.php @@ -15,7 +15,7 @@ abstract class TestCaseBase extends TestCase * * @see TestCase::expectNotToPerformAssertions() */ - public function assertDidNotCrash(): void + protected function assertDidNotCrash(): void { $this->addToAssertionCount(1); } diff --git a/tests/Type/DefinitionTest.php b/tests/Type/DefinitionTest.php index ab8f8a3ac..12bf5b8b1 100644 --- a/tests/Type/DefinitionTest.php +++ b/tests/Type/DefinitionTest.php @@ -55,7 +55,7 @@ final class DefinitionTest extends TestCaseBase public CustomScalarType $scalarType; - public function setUp(): void + protected function setUp(): void { $this->objectType = new ObjectType(['name' => 'Object', 'fields' => ['tmp' => Type::string()]]); $this->interfaceType = new InterfaceType(['name' => 'Interface', 'fields' => ['irrelevant' => Type::int()]]); diff --git a/tests/Type/EagerTypeLoaderTest.php b/tests/Type/EagerTypeLoaderTest.php index 1ce9668e3..2b0bc8c4f 100644 --- a/tests/Type/EagerTypeLoaderTest.php +++ b/tests/Type/EagerTypeLoaderTest.php @@ -24,7 +24,7 @@ final class EagerTypeLoaderTest extends TypeLoaderTestCaseBase private InputObjectType $postStoryMutationInput; - public function setUp(): void + protected function setUp(): void { parent::setUp(); diff --git a/tests/Type/EnumTypeTest.php b/tests/Type/EnumTypeTest.php index 2c19fc77e..1f99baac4 100644 --- a/tests/Type/EnumTypeTest.php +++ b/tests/Type/EnumTypeTest.php @@ -33,7 +33,7 @@ final class EnumTypeTest extends TestCase /** @var \ArrayObject */ private \ArrayObject $Complex2; - public function setUp(): void + protected function setUp(): void { $ColorType = new EnumType([ 'name' => 'Color', diff --git a/tests/Type/LazyTypeLoaderTest.php b/tests/Type/LazyTypeLoaderTest.php index 6aad472ee..e038725be 100644 --- a/tests/Type/LazyTypeLoaderTest.php +++ b/tests/Type/LazyTypeLoaderTest.php @@ -29,7 +29,7 @@ final class LazyTypeLoaderTest extends TypeLoaderTestCaseBase /** @var array */ private array $loadedTypes = []; - public function setUp(): void + protected function setUp(): void { parent::setUp(); diff --git a/tests/Type/SchemaTest.php b/tests/Type/SchemaTest.php index 10d4ee757..5781b9c80 100644 --- a/tests/Type/SchemaTest.php +++ b/tests/Type/SchemaTest.php @@ -25,7 +25,7 @@ final class SchemaTest extends TestCase private Schema $schema; - public function setUp(): void + protected function setUp(): void { $this->interfaceType = new InterfaceType([ 'name' => 'Interface', diff --git a/tests/Type/TestClasses/MyCustomType.php b/tests/Type/TestClasses/MyCustomType.php index e2a927fcf..609ab0a97 100644 --- a/tests/Type/TestClasses/MyCustomType.php +++ b/tests/Type/TestClasses/MyCustomType.php @@ -9,11 +9,10 @@ final class MyCustomType extends ObjectType { public function __construct() { - $config = [ + parent::__construct([ 'fields' => [ 'a' => Type::string(), ], - ]; - parent::__construct($config); + ]); } } diff --git a/tests/Type/TestClasses/ObjectIdStub.php b/tests/Type/TestClasses/ObjectIdStub.php index 2ee440573..1d3cc43a2 100644 --- a/tests/Type/TestClasses/ObjectIdStub.php +++ b/tests/Type/TestClasses/ObjectIdStub.php @@ -4,11 +4,9 @@ final class ObjectIdStub { - /** @var int */ - private $id; + private int $id; - /** @param int $id */ - public function __construct($id) + public function __construct(int $id) { $this->id = $id; } diff --git a/tests/Type/TestClasses/OtherCustom.php b/tests/Type/TestClasses/OtherCustom.php index ef5a7ecfc..109b9ff38 100644 --- a/tests/Type/TestClasses/OtherCustom.php +++ b/tests/Type/TestClasses/OtherCustom.php @@ -5,18 +5,15 @@ use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; -/** - * Note: named OtherCustom vs OtherCustomType intentionally. - */ +/** Named OtherCustom vs. OtherCustomType intentionally. */ final class OtherCustom extends ObjectType { public function __construct() { - $config = [ + parent::__construct([ 'fields' => [ 'b' => Type::string(), ], - ]; - parent::__construct($config); + ]); } } diff --git a/tests/Type/TypeLoaderTestCaseBase.php b/tests/Type/TypeLoaderTestCaseBase.php index ee9e8919c..ae965cab3 100644 --- a/tests/Type/TypeLoaderTestCaseBase.php +++ b/tests/Type/TypeLoaderTestCaseBase.php @@ -24,7 +24,7 @@ abstract class TypeLoaderTestCaseBase extends TestCaseBase /** @var array */ protected array $calls; - public function setUp(): void + protected function setUp(): void { $this->calls = []; } diff --git a/tests/Type/ValidationTest.php b/tests/Type/ValidationTest.php index 21c1fe6ab..af59ebe41 100644 --- a/tests/Type/ValidationTest.php +++ b/tests/Type/ValidationTest.php @@ -55,7 +55,7 @@ final class ValidationTest extends TestCaseBase public float $Number; - public function setUp(): void + protected function setUp(): void { $this->Number = 1; diff --git a/tests/Utils/BreakingChangesFinderTest.php b/tests/Utils/BreakingChangesFinderTest.php index fd263cab7..b9c365063 100644 --- a/tests/Utils/BreakingChangesFinderTest.php +++ b/tests/Utils/BreakingChangesFinderTest.php @@ -18,7 +18,7 @@ final class BreakingChangesFinderTest extends TestCase { private ObjectType $queryType; - public function setUp(): void + protected function setUp(): void { $this->queryType = new ObjectType([ 'name' => 'Query', diff --git a/tests/Utils/CoerceInputValueTest.php b/tests/Utils/CoerceInputValueTest.php index 90ba5e06c..6d23ea69a 100644 --- a/tests/Utils/CoerceInputValueTest.php +++ b/tests/Utils/CoerceInputValueTest.php @@ -36,7 +36,7 @@ final class CoerceInputValueTest extends TestCase /** @var ListOfType> */ private ListOfType $testNestedList; - public function setUp(): void + protected function setUp(): void { $this->testNonNull = Type::nonNull(Type::int()); diff --git a/tests/Utils/ExtractTypesTest.php b/tests/Utils/ExtractTypesTest.php index 9c6b0a119..1a73b3ee8 100644 --- a/tests/Utils/ExtractTypesTest.php +++ b/tests/Utils/ExtractTypesTest.php @@ -52,7 +52,7 @@ final class ExtractTypesTest extends TestCase /** @var InputObjectType */ private $postCommentMutationInput; - public function setUp(): void + protected function setUp(): void { $this->node = new InterfaceType([ 'name' => 'Node', diff --git a/tests/Utils/MixedStoreTest.php b/tests/Utils/MixedStoreTest.php index 83bc86678..ea1a63633 100644 --- a/tests/Utils/MixedStoreTest.php +++ b/tests/Utils/MixedStoreTest.php @@ -11,37 +11,38 @@ final class MixedStoreTest extends TestCase /** @var MixedStore */ private MixedStore $mixedStore; - public function setUp(): void + protected function setUp(): void { $this->mixedStore = new MixedStore(); } - public function testAcceptsNullKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsNullKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(null, $value); - } + $this->assertAcceptsKeyValue(null, $value); } - /** @return array */ - public function possibleValues(): array + /** @return iterable */ + public static function possibleValues(): iterable { + yield [null]; + yield [false]; + yield [true]; + yield ['']; + yield ['0']; + yield ['1']; + yield ['a']; + yield [[]]; + yield [new \stdClass()]; + yield [static function (): void {}]; + /** @var MixedStore $mixedStore */ $mixedStore = new MixedStore(); - - return [ - null, - false, - true, - '', - '0', - '1', - 'a', - [], - new \stdClass(), - static function (): void {}, - $mixedStore, - ]; + yield [$mixedStore]; } /** @@ -89,62 +90,71 @@ private function assertProvidesArrayAccess($key, $value): void self::assertFalse(isset($this->mixedStore[$key]), $err); } - public function testAcceptsBoolKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsBoolKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(false, $value); - } - - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(true, $value); - } + $this->assertAcceptsKeyValue(false, $value); + $this->assertAcceptsKeyValue(true, $value); } - public function testAcceptsIntKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsIntKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(-100000, $value); - $this->assertAcceptsKeyValue(-1, $value); - $this->assertAcceptsKeyValue(0, $value); - $this->assertAcceptsKeyValue(1, $value); - $this->assertAcceptsKeyValue(1000000, $value); - } + $this->assertAcceptsKeyValue(-100000, $value); + $this->assertAcceptsKeyValue(-1, $value); + $this->assertAcceptsKeyValue(0, $value); + $this->assertAcceptsKeyValue(1, $value); + $this->assertAcceptsKeyValue(1000000, $value); } - public function testAcceptsFloatKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsFloatKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(-100000.5, $value); - $this->assertAcceptsKeyValue(-1.6, $value); - $this->assertAcceptsKeyValue(-0.0001, $value); - $this->assertAcceptsKeyValue(0.0000, $value); - $this->assertAcceptsKeyValue(0.0001, $value); - $this->assertAcceptsKeyValue(1.6, $value); - $this->assertAcceptsKeyValue(1000000.5, $value); - } + $this->assertAcceptsKeyValue(-100000.5, $value); + $this->assertAcceptsKeyValue(-1.6, $value); + $this->assertAcceptsKeyValue(-0.0001, $value); + $this->assertAcceptsKeyValue(0.0000, $value); + $this->assertAcceptsKeyValue(0.0001, $value); + $this->assertAcceptsKeyValue(1.6, $value); + $this->assertAcceptsKeyValue(1000000.5, $value); } - public function testAcceptsArrayKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsArrayKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue([], $value); - $this->assertAcceptsKeyValue([null], $value); - $this->assertAcceptsKeyValue([[]], $value); - $this->assertAcceptsKeyValue([new \stdClass()], $value); - $this->assertAcceptsKeyValue(['a', 'b'], $value); - $this->assertAcceptsKeyValue(['a' => 'b'], $value); - } + $this->assertAcceptsKeyValue([], $value); + $this->assertAcceptsKeyValue([null], $value); + $this->assertAcceptsKeyValue([[]], $value); + $this->assertAcceptsKeyValue([new \stdClass()], $value); + $this->assertAcceptsKeyValue(['a', 'b'], $value); + $this->assertAcceptsKeyValue(['a' => 'b'], $value); } - public function testAcceptsObjectKeys(): void + /** + * @dataProvider possibleValues + * + * @param mixed $value anything goes + */ + public function testAcceptsObjectKeys($value): void { - foreach ($this->possibleValues() as $value) { - $this->assertAcceptsKeyValue(new \stdClass(), $value); - $this->assertAcceptsKeyValue(new MixedStore(), $value); - $this->assertAcceptsKeyValue( - static function (): void {}, - $value - ); - } + $this->assertAcceptsKeyValue(new \stdClass(), $value); + $this->assertAcceptsKeyValue(new MixedStore(), $value); + $this->assertAcceptsKeyValue(static function (): void {}, $value); } } diff --git a/tests/Utils/SchemaExtenderTest/SomeInterfaceClassType.php b/tests/Utils/SchemaExtenderTest/SomeInterfaceClassType.php index df7bb25cd..deba5dbbc 100644 --- a/tests/Utils/SchemaExtenderTest/SomeInterfaceClassType.php +++ b/tests/Utils/SchemaExtenderTest/SomeInterfaceClassType.php @@ -6,9 +6,7 @@ use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\ResolveInfo; -/** - * Custom class-based interface type for testing. - */ +/** Custom class-based interface type for testing. */ final class SomeInterfaceClassType extends InterfaceType { public ObjectType $concrete; diff --git a/tests/Utils/SchemaExtenderTest/SomeObjectClassType.php b/tests/Utils/SchemaExtenderTest/SomeObjectClassType.php index bda5ea50a..cf8a0078b 100644 --- a/tests/Utils/SchemaExtenderTest/SomeObjectClassType.php +++ b/tests/Utils/SchemaExtenderTest/SomeObjectClassType.php @@ -5,9 +5,7 @@ use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\ResolveInfo; -/** - * Custom class-based interface type for testing. - */ +/** Custom class-based interface type for testing. */ final class SomeObjectClassType extends ObjectType { public function isTypeOf($objectValue, $context, ResolveInfo $info): bool diff --git a/tests/Utils/SchemaExtenderTest/SomeScalarClassType.php b/tests/Utils/SchemaExtenderTest/SomeScalarClassType.php index 2f7f4ffce..f28013a21 100644 --- a/tests/Utils/SchemaExtenderTest/SomeScalarClassType.php +++ b/tests/Utils/SchemaExtenderTest/SomeScalarClassType.php @@ -5,9 +5,7 @@ use GraphQL\Language\AST\Node; use GraphQL\Type\Definition\ScalarType; -/** - * Custom class-based scalar type for testing. - */ +/** Custom class-based scalar type for testing. */ final class SomeScalarClassType extends ScalarType { public const SERIALIZE_RETURN = 'a constant value that is always returned from serialize'; diff --git a/tests/Utils/SchemaExtenderTest/SomeUnionClassType.php b/tests/Utils/SchemaExtenderTest/SomeUnionClassType.php index b3cc7243d..49c997369 100644 --- a/tests/Utils/SchemaExtenderTest/SomeUnionClassType.php +++ b/tests/Utils/SchemaExtenderTest/SomeUnionClassType.php @@ -6,9 +6,7 @@ use GraphQL\Type\Definition\ResolveInfo; use GraphQL\Type\Definition\UnionType; -/** - * Custom class-based union type for testing. - */ +/** Custom class-based union type for testing. */ final class SomeUnionClassType extends UnionType { public ObjectType $concrete; diff --git a/tests/Validator/KnownDirectivesTest.php b/tests/Validator/KnownDirectivesTest.php index 679ccef2f..5b0deb308 100644 --- a/tests/Validator/KnownDirectivesTest.php +++ b/tests/Validator/KnownDirectivesTest.php @@ -15,7 +15,7 @@ final class KnownDirectivesTest extends ValidatorTestCase { public Schema $schemaWithSDLDirectives; - public function setUp(): void + protected function setUp(): void { $this->schemaWithSDLDirectives = BuildSchema::build(' directive @onSchema on SCHEMA