Skip to content

Commit c65ce90

Browse files
committed
Merge branch 't/d2e68b46'
2 parents d2e68b4 + 02a82c0 commit c65ce90

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/FloatCmp.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use function floatval;
1414
use function function_exists;
1515
use function number_format;
16+
use function substr;
1617

1718
class FloatCmp
1819
{
@@ -55,11 +56,13 @@ private static function strval(
5556
float $value,
5657
int $scale
5758
): string {
58-
return number_format(
59+
/** @var string $result */
60+
$result = number_format(
5961
$value,
60-
$scale,
62+
++$scale,
6163
self::DECIMAL_SEPARATOR,
6264
''
6365
);
66+
return substr($result, 0, -1);
6467
}
6568
}

0 commit comments

Comments
 (0)