Passed
Push — master ( 75ecec...113700 )
by Carlos C
01:14 queued 12s
created

Localidad   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
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 34
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A estado() 0 3 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 Localidad implements EntryWithVigencias
11
{
12
    use EntryWithVigenciasTrait;
13
14
    /** @var string */
15
    private $codigo;
16
17
    /** @var string */
18
    private $estado;
19
20
    /** @var string*/
21
    private $texto;
22
23 7
    public function __construct(string $codigo, string $estado, string $texto, int $vigenteDesde, int $vigenteHasta)
24
    {
25 7
        $this->codigo = $codigo;
26 7
        $this->estado = $estado;
27 7
        $this->texto = $texto;
28 7
        $this->setUpVigencias($vigenteDesde, $vigenteHasta);
29
    }
30
31 6
    public function codigo(): string
32
    {
33 6
        return $this->codigo;
34
    }
35
36 6
    public function estado(): string
37
    {
38 6
        return $this->estado;
39
    }
40
41 3
    public function texto(): string
42
    {
43 3
        return $this->texto;
44
    }
45
}
46