Skip to content

Commit 6f65970

Browse files
committed
Fix TypeFormatter to handle float values correctly in formatGivenValue method.
1 parent a10907c commit 6f65970

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Internal/TypeFormatter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public static function formatGivenValue(mixed $value): string
2222
return "int ($value)";
2323
}
2424

25+
if (\is_float($value)) {
26+
return "float ($value)";
27+
}
28+
2529
if (\is_string($value)) {
2630
if ($value === '') {
2731
return "empty string ('')";

0 commit comments

Comments
 (0)