ListedRfc::setDeleted()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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