ListedRfc   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 19
dl 0
loc 69
ccs 25
cts 25
cp 1
rs 10
c 0
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A sncf() 0 3 1
A setSub() 0 3 1
A since() 0 3 1
A setDeleted() 0 3 1
A deleted() 0 3 1
A setSncf() 0 3 1
A rfc() 0 3 1
A sub() 0 3 1
A __construct() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\RfcLinc\Domain;
6
7
class ListedRfc
8
{
9
    /** @var string Value of "rfc" */
10
    private $rfc;
11
12
    /** @var VersionDate since when the record exists */
13
    private $since;
14
15
    /** @var bool Value of "sncf" */
16
    private $sncf;
17
18
    /** @var bool Value of "subcontratación" */
19
    private $sub;
20
21
    /** @var bool current state if the rfc is removed from the catalog */
22
    private $deleted;
23
24 13
    public function __construct(
25
        string $rfc,
26
        VersionDate $since,
27
        bool $sncf = false,
28
        bool $sub = false,
29
        bool $deleted = false
30
    ) {
31 13
        $this->rfc = $rfc;
32 13
        $this->since = $since;
33 13
        $this->sncf = $sncf;
34 13
        $this->sub = $sub;
35 13
        $this->deleted = $deleted;
36 13
    }
37
38 10
    public function rfc(): string
39
    {
40 10
        return $this->rfc;
41
    }
42
43 10
    public function since(): VersionDate
44
    {
45 10
        return $this->since;
46
    }
47
48 11
    public function sncf(): bool
49
    {
50 11
        return $this->sncf;
51
    }
52
53 11
    public function sub(): bool
54
    {
55 11
        return $this->sub;
56
    }
57
58 11
    public function deleted(): bool
59
    {
60 11
        return $this->deleted;
61
    }
62
63 4
    public function setSncf(bool $sncf)
64
    {
65 4
        $this->sncf = $sncf;
66 4
    }
67
68 4
    public function setSub(bool $sub)
69
    {
70 4
        $this->sub = $sub;
71 4
    }
72
73 4
    public function setDeleted(bool $deleted)
74
    {
75 4
        $this->deleted = $deleted;
76 4
    }
77
}
78