RfcLog::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
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 RfcLog
8
{
9
    const ACTION_CREATED = 0;
10
11
    const ACTION_REMOVED = 1;
12
13
    const ACTION_CHANGE_SNCF_ON = 2;
14
15
    const ACTION_CHANGE_SNCF_OFF = 3;
16
17
    const ACTION_CHANGE_SUB_ON = 4;
18
19
    const ACTION_CHANGE_SUB_OFF = 5;
20
21
    /** @var VersionDate */
22
    private $date;
23
24
    /** @var string */
25
    private $rfc;
26
27
    /** @var int */
28
    private $action;
29
30 6
    public function __construct(VersionDate $date, string $rfc, int $action)
31
    {
32 6
        $this->date = $date;
33 6
        $this->rfc = $rfc;
34 6
        $this->action = $action;
35 6
    }
36
37 6
    public function date(): VersionDate
38
    {
39 6
        return $this->date;
40
    }
41
42 5
    public function rfc(): string
43
    {
44 5
        return $this->rfc;
45
    }
46
47 6
    public function action(): int
48
    {
49 6
        return $this->action;
50
    }
51
}
52