Skip to content

Commit

Permalink
treat an int as a float
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Oct 31, 2024
1 parent 0b5e321 commit f1ebb0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fixtures/CreatedAtType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function normalize(mixed $value): null|string|int|float|bool

public function denormalize(null|string|int|float|bool $value): mixed
{
if (!\is_float($value)) {
if (!\is_float($value) && !\is_int($value)) {
throw new \LogicException("'$value' is not a float");
}

Expand Down

0 comments on commit f1ebb0a

Please sign in to comment.