Passed
Pull Request — master (#14)
by Carlos C
02:00
created

Estado   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 39
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A pais() 0 3 1
A __construct() 0 11 1
A codigo() 0 3 1
A texto() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\SatCatalogos\CFDI40;
6
7
use PhpCfdi\SatCatalogos\Common\EntryWithVigencias;
8
use PhpCfdi\SatCatalogos\Common\EntryWithVigenciasTrait;
9
10
class Estado implements EntryWithVigencias
11
{
12
    use EntryWithVigenciasTrait;
13
14
    /** @var string */
15
    private $codigo;
16
17
    /** @var string */
18
    private $pais;
19
20
    /** @var string */
21
    private $texto;
22
23 9
    public function __construct(
24
        string $codigo,
25
        string $pais,
26
        string $texto,
27
        int $vigenteDesde,
28
        int $vigenteHasta
29
    ) {
30 9
        $this->codigo = $codigo;
31 9
        $this->pais = $pais;
32 9
        $this->texto = $texto;
33 9
        $this->setUpVigencias($vigenteDesde, $vigenteHasta);
34
    }
35
36 7
    public function codigo(): string
37
    {
38 7
        return $this->codigo;
39
    }
40
41 5
    public function pais(): string
42
    {
43 5
        return $this->pais;
44
    }
45
46 4
    public function texto(): string
47
    {
48 4
        return $this->texto;
49
    }
50
}
51