Passed
Pull Request — master (#14)
by
unknown
02:43
created

Impuesto   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 47
ccs 14
cts 14
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A entidad() 0 3 1
A retencion() 0 3 1
A __construct() 0 13 1
A traslado() 0 3 1
A ambito() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\SatCatalogos\CFDI40;
6
7
use PhpCfdi\SatCatalogos\Common\AbstractEntryIdentifiable;
8
9
class Impuesto extends AbstractEntryIdentifiable
10
{
11
    /** @var bool */
12
    private $retencion;
13
14
    /** @var bool */
15
    private $traslado;
16
17
    /** @var string */
18
    private $ambito;
19
20
    /** @var string */
21
    private $entidad;
22
23 6
    public function __construct(
24
        string $id,
25
        string $texto,
26
        bool $retencion,
27
        bool $traslado,
28
        string $ambito,
29
        string $entidad
30
    ) {
31 6
        parent::__construct($id, $texto, 0, 0);
32 6
        $this->retencion = $retencion;
33 6
        $this->traslado = $traslado;
34 6
        $this->ambito = $ambito;
35 6
        $this->entidad = $entidad;
36
    }
37
38 3
    public function retencion(): bool
39
    {
40 3
        return $this->retencion;
41
    }
42
43 3
    public function traslado(): bool
44
    {
45 3
        return $this->traslado;
46
    }
47
48 1
    public function ambito(): string
49
    {
50 1
        return $this->ambito;
51
    }
52
53 1
    public function entidad(): string
54
    {
55 1
        return $this->entidad;
56
    }
57
}
58