Cleanup
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Exception;
|
||||
use DateTimeImmutable;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Service;
|
||||
@ -19,9 +20,18 @@ class Subsidio
|
||||
protected Service\Valor $valorService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int $venta_id
|
||||
* @return Model\Venta\Subsidio
|
||||
* @throws Read
|
||||
*/
|
||||
public function getByVenta(int $venta_id): Model\Venta\Subsidio
|
||||
{
|
||||
return $this->subsidioRepository->fetchByVenta($venta_id);
|
||||
try {
|
||||
return $this->subsidioRepository->fetchByVenta($venta_id);
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new Read(__CLASS__, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user