Skip to content

Commit 11c6b24

Browse files
Autofix
1 parent f085cc2 commit 11c6b24

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/Executor/AbstractTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,14 @@ public static function dogCatRootValues(): iterable
460460
],
461461
];
462462
yield [
463-
new class() {
463+
new class {
464464
public string $__typename = 'Dog';
465465

466466
public string $name = 'Odie';
467467

468468
public bool $woofs = true;
469469
},
470-
new class() {
470+
new class {
471471
public string $__typename = 'Cat';
472472

473473
public string $name = 'Garfield';

tests/Executor/ExecutorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ public function testDefaultResolverGrabsValuesOffOfCommonPhpDataStructures(): vo
12231223
],
12241224
'arrayAccess' => [
12251225
'type' => $ArrayAccess,
1226-
'resolve' => static fn (): \ArrayAccess => new class() implements \ArrayAccess {
1226+
'resolve' => static fn (): \ArrayAccess => new class implements \ArrayAccess {
12271227
/** @param mixed $offset */
12281228
#[\ReturnTypeWillChange]
12291229
public function offsetExists($offset): bool
@@ -1271,15 +1271,15 @@ public function offsetUnset($offset): void {}
12711271
],
12721272
'objectField' => [
12731273
'type' => $ObjectField,
1274-
'resolve' => static fn (): \stdClass => new class() extends \stdClass {
1274+
'resolve' => static fn (): \stdClass => new class extends \stdClass {
12751275
public ?int $set = 1;
12761276

12771277
public ?int $unset;
12781278
},
12791279
],
12801280
'objectVirtual' => [
12811281
'type' => $ObjectVirtual,
1282-
'resolve' => static fn (): object => new class() {
1282+
'resolve' => static fn (): object => new class {
12831283
public function __isset(string $name): bool
12841284
{
12851285
switch ($name) {

tests/Type/LazyDefinitionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testAllowsTypeWhichDefinesItFieldsAsInvokableClassReturningField
5353
$objType = new ObjectType([
5454
'name' => 'SomeObject',
5555
'fields' => [
56-
'f' => new class() {
56+
'f' => new class {
5757
/**
5858
* @throws InvariantViolation
5959
*

tests/Type/ScalarSerializationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testSerializesOutputAsString(): void
111111
self::assertSame('1', $stringType->serialize(true));
112112
self::assertSame('', $stringType->serialize(false));
113113
self::assertSame('', $stringType->serialize(null));
114-
self::assertSame('foo', $stringType->serialize(new class() implements \Stringable {
114+
self::assertSame('foo', $stringType->serialize(new class implements \Stringable {
115115
public function __toString(): string
116116
{
117117
return 'foo';

tests/Validator/CustomRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class CustomRuleTest extends ValidatorTestCase
1616

1717
public function testAddRuleCanReplaceDefaultRules(): void
1818
{
19-
DocumentValidator::addRule(new class() extends ExecutableDefinitions {
19+
DocumentValidator::addRule(new class extends ExecutableDefinitions {
2020
public function getName(): string
2121
{
2222
return ExecutableDefinitions::class;

0 commit comments

Comments
 (0)