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

ClaveUnidad   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 simbolo() 0 3 1
A __construct() 0 13 1
A descripcion() 0 3 1
A nota() 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 ClaveUnidad extends AbstractEntryIdentifiable
10
{
11
    /** @var string */
12
    private $descripcion;
13
14
    /** @var string */
15
    private $nota;
16
17
    /** @var string */
18
    private $simbolo;
19
20 2
    public function __construct(
21
        string $id,
22
        string $texto,
23
        string $descripcion,
24
        string $nota,
25
        string $simbolo,
26
        int $vigenteDesde,
27
        int $vigenteHasta
28
    ) {
29 2
        parent::__construct($id, $texto, $vigenteDesde, $vigenteHasta);
30 2
        $this->descripcion = $descripcion;
31 2
        $this->nota = $nota;
32 2
        $this->simbolo = $simbolo;
33
    }
34
35 1
    public function descripcion(): string
36
    {
37 1
        return $this->descripcion;
38
    }
39
40 1
    public function nota(): string
41
    {
42 1
        return $this->nota;
43
    }
44
45 1
    public function simbolo(): string
46
    {
47 1
        return $this->simbolo;
48
    }
49
}
50