| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 4 | public function __construct( |
|
| 19 | string $id, |
||
| 20 | string $texto, |
||
| 21 | int $decimales, |
||
| 22 | int $porcentajeVariacion, |
||
| 23 | int $vigenteDesde, |
||
| 24 | int $vigenteHasta |
||
| 25 | ) { |
||
| 26 | 4 | parent::__construct($id, $texto, $vigenteDesde, $vigenteHasta); |
|
| 27 | 4 | if ($decimales < 0) { |
|
| 28 | 1 | throw new SatCatalogosLogicException('El campo decimales no puede ser menor a cero'); |
|
| 29 | } |
||
| 30 | 3 | if ($porcentajeVariacion < 0) { |
|
| 31 | 1 | throw new SatCatalogosLogicException('El campo porcentaje de variación no puede ser menor a cero'); |
|
| 32 | } |
||
| 33 | 2 | $this->decimales = $decimales; |
|
| 34 | 2 | $this->porcentajeVariacion = $porcentajeVariacion; |
|
| 35 | } |
||
| 47 |