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

Impuesto   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 11
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 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 6
    public function __construct(
21
        string $id,
22
        string $texto,
23
        bool $retencion,
24
        bool $traslado,
25
        string $ambito,
26
        int $vigenteDesde,
27
        int $vigenteHasta
28
    ) {
29 6
        parent::__construct($id, $texto, $vigenteDesde, $vigenteHasta);
30 6
        $this->retencion = $retencion;
31 6
        $this->traslado = $traslado;
32 6
        $this->ambito = $ambito;
33
    }
34
35 3
    public function retencion(): bool
36
    {
37 3
        return $this->retencion;
38
    }
39
40 3
    public function traslado(): bool
41
    {
42 3
        return $this->traslado;
43
    }
44
45 1
    public function ambito(): string
46
    {
47 1
        return $this->ambito;
48
    }
49
}
50