Completed
Pull Request — master (#11)
by Carlos C
03:41
created

AddCommand   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 54
ccs 17
cts 17
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A rfc() 0 3 1
A privateKey() 0 3 1
A __construct() 0 12 1
A passPhrase() 0 3 1
A certificate() 0 3 1
A type() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\Finkok\Services\Registration;
6
7
class AddCommand
8
{
9
    /** @var string */
10
    private $rfc;
11
12
    /** @var CustomerType */
13
    private $type;
14
15
    /** @var string */
16
    private $certificate;
17
18
    /** @var string */
19
    private $privateKey;
20
21
    /** @var string */
22
    private $passPhrase;
23
24 3
    public function __construct(
25
        string $rfc,
26
        ?CustomerType $type = null,
27
        string $certificate = '',
28
        string $privateKey = '',
29
        string $passPhrase = ''
30
    ) {
31 3
        $this->rfc = $rfc;
32 3
        $this->type = $type ?? CustomerType::ondemand();
33 3
        $this->certificate = $certificate;
34 3
        $this->privateKey = $privateKey;
35 3
        $this->passPhrase = $passPhrase;
36 3
    }
37
38 3
    public function rfc(): string
39
    {
40 3
        return $this->rfc;
41
    }
42
43 3
    public function type(): CustomerType
44
    {
45 3
        return $this->type;
46
    }
47
48 3
    public function certificate(): string
49
    {
50 3
        return $this->certificate;
51
    }
52
53 3
    public function privateKey(): string
54
    {
55 3
        return $this->privateKey;
56
    }
57
58 3
    public function passPhrase(): string
59
    {
60 3
        return $this->passPhrase;
61
    }
62
}
63