Files
oficial/app/src/Service/Valor.php

14 lines
273 B
PHP
Raw Normal View History

<?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);
}
}