Skip to content

Commit 61653fc

Browse files
committed
fix rector
1 parent ee56f3e commit 61653fc

7 files changed

+8
-8
lines changed

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaChoiceRestriction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
106106
return false;
107107
}
108108

109-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
109+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
110110
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
111111
$types = [LegacyType::BUILTIN_TYPE_STRING];
112112
}
@@ -116,7 +116,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
116116
&& $builtinType->isCollection()
117117
&& \count($builtinType->getCollectionValueTypes()) > 0
118118
) {
119-
$types = array_unique(array_merge($types, array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $builtinType->getCollectionValueTypes())));
119+
$types = array_unique(array_merge($types, array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $builtinType->getCollectionValueTypes())));
120120
}
121121

122122
return \count($types) > 0 && \count(array_intersect($types, [LegacyType::BUILTIN_TYPE_STRING, LegacyType::BUILTIN_TYPE_INT, LegacyType::BUILTIN_TYPE_FLOAT])) > 0;

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaGreaterThanOrEqualRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
5252
return $type->isIdentifiedBy(TypeIdentifier::INT, TypeIdentifier::FLOAT);
5353
}
5454

55-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
55+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
5656
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
5757
$types = [LegacyType::BUILTIN_TYPE_INT];
5858
}

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaGreaterThanRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
5656
return $type->isIdentifiedBy(TypeIdentifier::INT, TypeIdentifier::FLOAT);
5757
}
5858

59-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
59+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
6060
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
6161
$types = [LegacyType::BUILTIN_TYPE_INT];
6262
}

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaLengthRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
5959
return $constraint instanceof Length && $type?->isIdentifiedBy(TypeIdentifier::STRING);
6060
}
6161

62-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
62+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
6363
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
6464
$types = [LegacyType::BUILTIN_TYPE_STRING];
6565
}

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaLessThanOrEqualRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
5555
return $type->isIdentifiedBy(TypeIdentifier::INT, TypeIdentifier::FLOAT);
5656
}
5757

58-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
58+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
5959
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
6060
$types = [LegacyType::BUILTIN_TYPE_INT];
6161
}

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaLessThanRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
5353
return $type->isIdentifiedBy(TypeIdentifier::INT, TypeIdentifier::FLOAT);
5454
}
5555

56-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
56+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
5757
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
5858
$types = [LegacyType::BUILTIN_TYPE_INT];
5959
}

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRangeRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function supports(Constraint $constraint, ApiProperty $propertyMetadata):
6363
return $type->isIdentifiedBy(TypeIdentifier::INT, TypeIdentifier::FLOAT);
6464
}
6565

66-
$types = array_map(static fn (LegacyType $type) => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
66+
$types = array_map(static fn (LegacyType $type): string => $type->getBuiltinType(), $propertyMetadata->getBuiltinTypes() ?? []);
6767
if ($propertyMetadata->getExtraProperties()['nested_schema'] ?? false) {
6868
$types = [LegacyType::BUILTIN_TYPE_INT];
6969
}

0 commit comments

Comments
 (0)