Skip to content

Commit e199d72

Browse files
committed
Fixed failed test
1 parent 31ca7f4 commit e199d72

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public static function bool($variable): bool
150150
* @param int $round
151151
* @return float
152152
*/
153-
public static function float($value, int $round = 16): float
153+
public static function float($value, int $round = 10): float
154154
{
155155
$cleaned = (string)\preg_replace('#[^\deE\-\.\,]#iu', '', (string)$value);
156156
$cleaned = \str_replace(',', '.', $cleaned);

tests/EnvTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
namespace JBZoo\PHPUnit;
1919

2020
use JBZoo\Utils\Env;
21+
use JBZoo\Utils\Filter;
2122

2223
/**
2324
* Class EnvTest
@@ -94,7 +95,7 @@ public function testInt(): void
9495

9596
public function testFloat(): void
9697
{
97-
$value = 1 / 3;
98+
$value = Filter::float(1 / 3);
9899

99100
putenv("FOO= {$value} ");
100101
isSame($value, Env::float('FOO'));

0 commit comments

Comments
 (0)