Completed
Push — master ( 189007...259fd8 )
by Dmitry
08:51
created

Credentials   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 91
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 0
dl 0
loc 91
ccs 22
cts 22
cp 1
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getPurse() 0 4 1
A setPurse() 0 6 1
A getKey1() 0 4 1
A setKey1() 0 6 1
A getKey2() 0 4 1
A setKey2() 0 6 1
A getKey3() 0 4 1
A setKey3() 0 6 1
A isTestMode() 0 4 1
A setTestMode() 0 6 1
1
<?php
2
3
namespace hiqdev\php\merchant\credentials;
4
5
/**
6
 * Class Credentials
7
 *
8
 * @author Dmytro Naumenko <[email protected]>
9
 */
10
final class Credentials implements CredentialsInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $purse;
16
    /**
17
     * @var string
18
     */
19
    protected $key1;
20
    /**
21
     * @var string
22
     */
23
    protected $key2;
24
    /**
25
     * @var string
26
     */
27
    protected $key3;
28
29
    /**
30
     * @var bool
31
     */
32
    protected $isTestMode = false;
33
34
    public function getPurse()
35
    {
36
        return $this->purse;
37
    }
38
39
    public function setPurse($purse): self
40
    {
41
        $this->purse = $purse;
42 1
43
        return $this;
44 1
    }
45
46
    public function getKey1()
47 1
    {
48
        return $this->key1;
49 1
    }
50
51 1
    public function setKey1($key1): self
52
    {
53
        $this->key1 = $key1;
54 1
55
        return $this;
56 1
    }
57
58
    public function getKey2()
59 1
    {
60
        return $this->key2;
61 1
    }
62
63 1
    public function setKey2($key2): self
64
    {
65
        $this->key2 = $key2;
66 1
67
        return $this;
68 1
    }
69
70
    public function getKey3()
71 1
    {
72
        return $this->key3;
73 1
    }
74
75 1
    public function setKey3($key3): self
76
    {
77
        $this->key3 = $key3;
78 1
79
        return $this;
80 1
    }
81
82
    /**
83 1
     * @return bool
84
     */
85 1
    public function isTestMode(): bool
86
    {
87 1
        return $this->isTestMode;
88
    }
89
90
    /**
91
     * @param boolean $value
92
     * @return $this
93 1
     */
94
    public function setTestMode($value)
95 1
    {
96
        $this->isTestMode = (bool)$value;
97
98
        return $this;
99
    }
100
}
101