Desistir venta
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
namespace Incoviba\Service;
|
||||
|
||||
use DateTimeInterface;
|
||||
use DateTimeImmutable;
|
||||
use Incoviba\Common\Implement\Exception\EmptyRedis;
|
||||
|
||||
class UF
|
||||
@ -10,8 +11,11 @@ class UF
|
||||
|
||||
public function __construct(protected Redis $redisService, protected Money $moneyService) {}
|
||||
|
||||
public function get(DateTimeInterface $date): float
|
||||
public function get(?DateTimeInterface $date = null): float
|
||||
{
|
||||
if ($date === null) {
|
||||
$date = new DateTimeImmutable();
|
||||
}
|
||||
$ufs = [];
|
||||
try {
|
||||
$ufs = json_decode($this->redisService->get($this->redisKey), JSON_OBJECT_AS_ARRAY);
|
||||
|
||||
Reference in New Issue
Block a user