Skip to content

Commit 945f823

Browse files
committed
fix code styling
1 parent dcc8730 commit 945f823

11 files changed

Lines changed: 17 additions & 18 deletions

‎src/Internal/Checker/ParamChecker.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,4 +1454,4 @@ private static function typeContainsNull(TypeNode $node): bool
14541454

14551455
return false;
14561456
}
1457-
}
1457+
}

‎src/Internal/Docblock/DocblockParser.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ public static function substituteAliases(TypeNode $node, array $aliases): TypeNo
16281628

16291629
if ($node instanceof CallableTypeNode) {
16301630
$parameters = array_map(
1631-
fn(CallableTypeParameterNode $param) => new CallableTypeParameterNode(
1631+
fn (CallableTypeParameterNode $param) => new CallableTypeParameterNode(
16321632
self::substituteAliases($param->type, $aliases),
16331633
$param->isReference,
16341634
$param->isVariadic,
@@ -1662,7 +1662,7 @@ public static function substituteAliases(TypeNode $node, array $aliases): TypeNo
16621662
if ($node instanceof GenericTypeNode) {
16631663
$genericType = self::substituteAliases($node->type, $aliases);
16641664
$genericTypes = array_map(
1665-
fn($t) => self::substituteAliases($t, $aliases),
1665+
fn ($t) => self::substituteAliases($t, $aliases),
16661666
$node->genericTypes
16671667
);
16681668

@@ -1679,7 +1679,7 @@ public static function substituteAliases(TypeNode $node, array $aliases): TypeNo
16791679

16801680
if ($node instanceof UnionTypeNode) {
16811681
$types = array_map(
1682-
fn($t) => self::substituteAliases($t, $aliases),
1682+
fn ($t) => self::substituteAliases($t, $aliases),
16831683
$node->types
16841684
);
16851685

@@ -1694,7 +1694,7 @@ public static function substituteAliases(TypeNode $node, array $aliases): TypeNo
16941694

16951695
if ($node instanceof IntersectionTypeNode) {
16961696
$types = array_map(
1697-
fn($t) => self::substituteAliases($t, $aliases),
1697+
fn ($t) => self::substituteAliases($t, $aliases),
16981698
$node->types
16991699
);
17001700

‎src/Internal/Generics/TemplateManager.php‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,6 @@ public static function isBound(string $function, object|string|null $thisOrClass
690690
return false;
691691
}
692692

693-
694693
/**
695694
* Retrieves the bound TypeNode for a template name from instance, static class, or call stack context.
696695
*/
@@ -1495,7 +1494,7 @@ private static function resolveTypeNodeAst(TypeNode $n, \ReflectionClass $ref):
14951494
};
14961495

14971496
$base = new IdentifierTypeNode($baseName);
1498-
$generics = array_map(fn($t) => self::resolveTypeNodeAst($t, $ref), $n->genericTypes);
1497+
$generics = array_map(fn ($t) => self::resolveTypeNodeAst($t, $ref), $n->genericTypes);
14991498

15001499
return new GenericTypeNode($base, $generics, $n->variances);
15011500
}
@@ -1509,11 +1508,11 @@ private static function resolveTypeNodeAst(TypeNode $n, \ReflectionClass $ref):
15091508
}
15101509

15111510
if ($n instanceof UnionTypeNode) {
1512-
return new UnionTypeNode(array_map(fn($t) => self::resolveTypeNodeAst($t, $ref), $n->types));
1511+
return new UnionTypeNode(array_map(fn ($t) => self::resolveTypeNodeAst($t, $ref), $n->types));
15131512
}
15141513

15151514
if ($n instanceof IntersectionTypeNode) {
1516-
return new IntersectionTypeNode(array_map(fn($t) => self::resolveTypeNodeAst($t, $ref), $n->types));
1515+
return new IntersectionTypeNode(array_map(fn ($t) => self::resolveTypeNodeAst($t, $ref), $n->types));
15171516
}
15181517

15191518
return $n;

‎tests/Fixtures/Probe/Route.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ enum Route: string implements RouteInterface
1515

1616
case A = 'a';
1717
case B = 'b';
18-
}
18+
}

‎tests/Fixtures/Probe/RouteClass.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public static function from(string $name): self
1717
{
1818
return new self();
1919
}
20-
}
20+
}

‎tests/Fixtures/Probe/RouteInterface.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ interface RouteInterface
1313
* @return TRoute
1414
*/
1515
public static function fromName(string $name): self;
16-
}
16+
}

‎tests/Fixtures/Probe/Sub/HasRoute.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ public static function fromName(string $name): self
1010
{
1111
return self::from($name);
1212
}
13-
}
13+
}

‎tests/Fixtures/Probe/UnparameterizedRoute.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ enum UnparameterizedRoute: string implements RouteInterface
1212

1313
case A = 'a';
1414
case B = 'b';
15-
}
15+
}

‎tests/TypeChecking/Generics/MethodTemplateGenericArgumentInferenceTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function unwrapAll(array $items): array
7575
test('infers method template T from generic argument PBox<T> instead of falling back to upper bound PBase', function () {
7676
$consumer = new MethodTemplateConsumer();
7777
$boxA = new MethodTemplateBox(new MethodTemplateA('Alpha'));
78-
78+
7979
$result = $consumer->unwrap($boxA);
8080

8181
expect($result)->toBeInstanceOf(MethodTemplateA::class)
@@ -110,4 +110,4 @@ public function unwrapAll(array $items): array
110110
->and($result[1])->toBeInstanceOf(MethodTemplateA::class)
111111
;
112112
});
113-
});
113+
});

‎tests/TypeChecking/Generics/StaticMethodSubclassGenericInheritanceTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ final class StaticGenericAnyId extends StaticGenericIdBase
141141
;
142142
});
143143
});
144-
});
144+
});

0 commit comments

Comments
 (0)