We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba4b676 commit 755a829Copy full SHA for 755a829
src/Type/FloatType.php
@@ -23,15 +23,13 @@ public function __construct(
23
24
public function match(mixed $value, Context $context): bool
25
{
26
- return \is_float($value)
27
- || ($context->isNormalization() && \is_int($value));
+ return \is_float($value);
28
}
29
30
public function cast(mixed $value, Context $context): float
31
32
return match (true) {
33
\is_float($value) => $value,
34
- \is_int($value) => (float) $value,
35
!$context->isStrictTypesEnabled() => $this->coercer->coerce($value, $context),
36
default => throw InvalidValueException::createFromContext(
37
value: $value,
0 commit comments