Limpieza de input de valor y filtro de datos a nivel Repo

This commit is contained in:
Juan Pablo Vial
2024-07-03 15:13:13 -04:00
parent d5b9be0196
commit d68eba5697
28 changed files with 436 additions and 189 deletions

13
app/src/Service/Valor.php Normal file
View File

@ -0,0 +1,13 @@
<?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);
}
}