Update
parent
a017e932ba
commit
b9d657ad45
|
|
@ -13,9 +13,9 @@ class Numeric
|
||||||
public static function trimZero($value)
|
public static function trimZero($value)
|
||||||
{
|
{
|
||||||
if (is_numeric($value) && strpos($value, '.') !== false) {
|
if (is_numeric($value) && strpos($value, '.') !== false) {
|
||||||
return rtrim(rtrim($value, '0'), '.');
|
$value = rtrim(trim($value, '0'), '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value ?: '0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue