Pais::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 6
dl 0
loc 13
ccs 6
cts 6
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\SatCatalogos\CFDI40;
6
7
use PhpCfdi\SatCatalogos\Common\AbstractEntryIdentifiable;
8
use PhpCfdi\SatCatalogos\Common\EntryIdentifiable;
9
use PhpCfdi\SatCatalogos\Helpers\Patron;
10
11
class Pais extends AbstractEntryIdentifiable implements EntryIdentifiable
12
{
13
    /** @var Patron */
14
    private $patronCodigoPostal;
15
16
    /** @var Patron */
17
    private $patronIdentidadTributaria;
18
19
    /** @var string */
20
    private $validacionIdentidadTributaria;
21
22
    /** @var string */
23
    private $agrupaciones;
24
25 10
    public function __construct(
26
        string $id,
27
        string $texto,
28
        string $patronCodigoPostal,
29
        string $patronIdentidadTributaria,
30
        string $validacionIdentidadTributaria,
31
        string $agrupaciones
32
    ) {
33 10
        parent::__construct($id, $texto, 0, 0);
34 10
        $this->patronCodigoPostal = new Patron($patronCodigoPostal, Patron::VACIO_PERMITE_TODO);
35 9
        $this->patronIdentidadTributaria = new Patron($patronIdentidadTributaria, Patron::VACIO_PERMITE_TODO);
36 8
        $this->validacionIdentidadTributaria = $validacionIdentidadTributaria;
37 8
        $this->agrupaciones = $agrupaciones;
38
    }
39
40 5
    public function patronCodigoPostal(): Patron
41
    {
42 5
        return $this->patronCodigoPostal;
43
    }
44
45 5
    public function patronIdentidadTributaria(): Patron
46
    {
47 5
        return $this->patronIdentidadTributaria;
48
    }
49
50 3
    public function validacionIdentidadTributaria(): string
51
    {
52 3
        return $this->validacionIdentidadTributaria;
53
    }
54
55 3
    public function agrupaciones(): string
56
    {
57 3
        return $this->agrupaciones;
58
    }
59
}
60