Skip to content

Commit 1e5d49a

Browse files
committed
Update PHP-CS-Fixer and code style
1 parent 6d841ef commit 1e5d49a

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"bamarni/composer-bin-plugin": "^1.8.2",
2828
"dragon-code/benchmark": "^2.6 || ^3",
2929
"ergebnis/composer-normalize": "^2.43.0",
30-
"friendsofphp/php-cs-fixer": "^3.61.1",
30+
"friendsofphp/php-cs-fixer": "^3.62.0",
3131
"mikey179/vfsstream": "^1.6.11",
3232
"phpstan/phpstan": "^1.11.9",
3333
"phpyh/coding-standard": "^2.6.1",

src/Type/Visitor/TypeStringifier.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function stringValue(Type $type, string $value): mixed
107107
public function classString(Type $type, Type $classType): mixed
108108
{
109109
$isObject = $classType->accept(
110-
new /** @extends DefaultTypeVisitor<bool> */ class () extends DefaultTypeVisitor {
110+
new /** @extends DefaultTypeVisitor<bool> */ class extends DefaultTypeVisitor {
111111
public function object(Type $type, array $properties): mixed
112112
{
113113
return true;
@@ -360,7 +360,7 @@ public function varianceAware(Type $type, Type $ofType, Variance $variance): mix
360360

361361
public function union(Type $type, array $ofTypes): mixed
362362
{
363-
$isIntersection = new /** @extends DefaultTypeVisitor<bool> */ class () extends DefaultTypeVisitor {
363+
$isIntersection = new /** @extends DefaultTypeVisitor<bool> */ class extends DefaultTypeVisitor {
364364
public function intersection(Type $type, array $ofTypes): mixed
365365
{
366366
return true;
@@ -396,7 +396,7 @@ public function argument(Type $type, ParameterId $parameterId): mixed
396396

397397
public function intersection(Type $type, array $ofTypes): mixed
398398
{
399-
$isUnion = new /** @extends DefaultTypeVisitor<bool> */ class () extends DefaultTypeVisitor {
399+
$isUnion = new /** @extends DefaultTypeVisitor<bool> */ class extends DefaultTypeVisitor {
400400
public function union(Type $type, array $ofTypes): mixed
401401
{
402402
return true;

tests/Reflection/Internal/NativeAdapter/AdapterCompatibilityTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,8 @@ private static function getClasses(\ReflectionClass $class): \Generator
617617
$parent = $parent->getParentClass();
618618
}
619619

620-
yield (new class () {})::class;
621-
yield (new class () extends \stdClass {})::class;
620+
yield (new class {})::class;
621+
yield (new class extends \stdClass {})::class;
622622
yield \Traversable::class;
623623
yield \Iterator::class;
624624
yield \IteratorAggregate::class;
@@ -654,9 +654,9 @@ private static function getObjects(\ReflectionClass $class): \Generator
654654

655655
yield static fn(): int => 1;
656656
yield (static fn(): \Generator => yield 1)();
657-
yield new class () {};
658-
yield new class () extends \stdClass {};
659-
yield new class () {
657+
yield new class {};
658+
yield new class extends \stdClass {};
659+
yield new class {
660660
public function __toString(): string
661661
{
662662
return '';

tests/Reflection/functional_tests/class/anonymous_class_id.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use function PHPUnit\Framework\assertSame;
1111

1212
return static function (TyphoonReflector $reflector): void {
13-
$object = new class () {};
13+
$object = new class {};
1414

1515
$id = $reflector->reflectClass($object::class)->id;
1616

tests/Type/Visitor/DefaultTypeVisitorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testItCoversAllMethods(): void
1616
$this->expectNotToPerformAssertions();
1717

1818
/** @phpstan-ignore expr.resultUnused */
19-
new /** @extends DefaultTypeVisitor<null> */ class () extends DefaultTypeVisitor {
19+
new /** @extends DefaultTypeVisitor<null> */ class extends DefaultTypeVisitor {
2020
protected function default(Type $type): mixed
2121
{
2222
return null;

tests/Type/Visitor/RecursiveTypeReplacerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static function typesProvider(): \Generator
6464
#[DataProvider('typesProvider')]
6565
public function testItPreservesTypesIfNothingChanges(Type $type): void
6666
{
67-
$replaced = $type->accept(new class () extends RecursiveTypeReplacer {});
67+
$replaced = $type->accept(new class extends RecursiveTypeReplacer {});
6868

6969
self::assertSame($type, $replaced);
7070
}

0 commit comments

Comments
 (0)