RfcLog   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 43
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A rfc() 0 3 1
A action() 0 3 1
A date() 0 3 1
A __construct() 0 5 1
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