Skip to content

Commit 755a829

Browse files
committed
Remove int from float type
1 parent ba4b676 commit 755a829

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Type/FloatType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ public function __construct(
2323

2424
public function match(mixed $value, Context $context): bool
2525
{
26-
return \is_float($value)
27-
|| ($context->isNormalization() && \is_int($value));
26+
return \is_float($value);
2827
}
2928

3029
public function cast(mixed $value, Context $context): float
3130
{
3231
return match (true) {
3332
\is_float($value) => $value,
34-
\is_int($value) => (float) $value,
3533
!$context->isStrictTypesEnabled() => $this->coercer->coerce($value, $context),
3634
default => throw InvalidValueException::createFromContext(
3735
value: $value,

0 commit comments

Comments
 (0)