Completed
Pull Request — master (#1)
by Dmitry
14:10
created

Credentials   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 91
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 0
dl 0
loc 91
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
43
        return $this;
44
    }
45
46
    public function getKey1()
47
    {
48
        return $this->key1;
49
    }
50
51
    public function setKey1($key1): self
52
    {
53
        $this->key1 = $key1;
54
55
        return $this;
56
    }
57
58
    public function getKey2()
59
    {
60
        return $this->key2;
61
    }
62
63
    public function setKey2($key2): self
64
    {
65
        $this->key2 = $key2;
66
67
        return $this;
68
    }
69
70
    public function getKey3()
71
    {
72
        return $this->key3;
73
    }
74
75
    public function setKey3($key3): self
76
    {
77
        $this->key3 = $key3;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return bool
84
     */
85
    public function isTestMode(): bool
86
    {
87
        return $this->isTestMode;
88
    }
89
90
    /**
91
     * @param boolean $value
92
     * @return $this
93
     */
94
    public function setTestMode($value)
95
    {
96
        $this->isTestMode = (bool)$value;
97
98
        return $this;
99
    }
100
}
101