Cleanup
This commit is contained in:
@ -3,6 +3,8 @@ namespace Incoviba\Service\Venta;
|
||||
|
||||
use Exception;
|
||||
use DateTimeImmutable;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Repository;
|
||||
@ -24,9 +26,18 @@ class Credito extends Ideal\Service
|
||||
parent::__construct($logger);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $venta_id
|
||||
* @return Model\Venta\Credito
|
||||
* @throws Read
|
||||
*/
|
||||
public function getByVenta(int $venta_id): Model\Venta\Credito
|
||||
{
|
||||
return $this->creditoRepository->fetchByVenta($venta_id);
|
||||
try {
|
||||
return $this->creditoRepository->fetchByVenta($venta_id);
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new Read(__CLASS__, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user