14 lines
273 B
PHP
14 lines
273 B
PHP
![]() |
<?php
|
||
|
namespace Incoviba\Service;
|
||
|
|
||
|
class Valor
|
||
|
{
|
||
|
public function clean(string|float|int $value): float
|
||
|
{
|
||
|
if ((float) $value == $value) {
|
||
|
return (float) $value;
|
||
|
}
|
||
|
return (float) str_replace(['.', ','], ['', '.'], $value);
|
||
|
}
|
||
|
}
|