| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | abstract class AbstractEntryIdentifiable implements EntryIdentifiable |
||
| 10 | { |
||
| 11 | use EntryWithVigenciasTrait; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | private $id; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | private $texto; |
||
| 18 | |||
| 19 | 232 | public function __construct(string $id, string $texto, int $vigenteDesde, int $vigenteHasta) |
|
| 20 | { |
||
| 21 | 232 | if ('' === $id) { |
|
| 22 | 1 | throw new SatCatalogosLogicException('El campo ID no puede ser una cadena de caracteres vacía'); |
|
| 23 | } |
||
| 24 | 231 | if ('' === $texto) { |
|
| 25 | 1 | throw new SatCatalogosLogicException('El campo texto no puede ser una cadena de caracteres vacía'); |
|
| 26 | } |
||
| 27 | 230 | $this->id = $id; |
|
| 28 | 230 | $this->texto = $texto; |
|
| 29 | 230 | $this->setUpVigencias($vigenteDesde, $vigenteHasta); |
|
| 30 | } |
||
| 31 | |||
| 32 | 123 | public function id(): string |
|
| 33 | { |
||
| 34 | 123 | return $this->id; |
|
| 35 | } |
||
| 36 | |||
| 37 | 83 | public function texto(): string |
|
| 40 | } |
||
| 41 | } |
||
| 42 |