Completed
Push — develop ( f27a4b...1f3da4 )
by Žilvinas
03:40
created

ScResult::getCountry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
4
namespace Isign\Login;
5
6
use Isign\ResultInterface;
7
8
class ScResult implements ResultInterface
9
{
10
    /** @var string response status */
11
    private $status;
12
    /** @var string hash which needs to be signed */
13
    private $dtbs;
14
    /** @var string session token */
15
    private $token;
16
    /** @var string user's first name */
17
    private $name;
18
    /** @var string user's last name */
19
    private $surname;
20
    /** @var string user's personal code */
21
    private $code;
22
    /** @var string user's country */
23
    private $country;
24
    /** @var string user's login certificate */
25
    private $certificate;
26
    /** @var string signature algorithm */
27
    private $algorithm;
28
    /**
29
     * Fields expected in response
30
     * @return array
31
     */
32 8
    public function getFields()
33
    {
34
        return [
35 8
            'status',
36 8
            'dtbs',
37 8
            'token',
38 8
            'name',
39 8
            'surname',
40 8
            'code',
41 8
            'country',
42 8
            'certificate',
43
            'algorithm'
44 8
        ];
45
    }
46
47
    /**
48
     * @return string
49
     */
50 1
    public function getStatus()
51
    {
52 1
        return $this->status;
53
    }
54
55
    /**
56
     * @param string $status
57
     */
58 1
    public function setStatus($status)
59
    {
60 1
        $this->status = $status;
61 1
    }
62
63
    /**
64
     * @return string
65
     */
66 1
    public function getDtbs()
67
    {
68 1
        return $this->dtbs;
69
    }
70
71
    /**
72
     * @param string $dtbs
73
     */
74 1
    public function setDtbs($dtbs)
75
    {
76 1
        $this->dtbs = $dtbs;
77 1
    }
78
79
    /**
80
     * @return string
81
     */
82 1
    public function getToken()
83
    {
84 1
        return $this->token;
85
    }
86
87
    /**
88
     * @param string $token
89
     */
90 1
    public function setToken($token)
91
    {
92 1
        $this->token = $token;
93 1
    }
94
95
    /**
96
     * @return string
97
     */
98 1
    public function getName()
99
    {
100 1
        return $this->name;
101
    }
102
103
    /**
104
     * @param string $name
105
     */
106 1
    public function setName($name)
107
    {
108 1
        $this->name = $name;
109 1
    }
110
111
    /**
112
     * @return string
113
     */
114 1
    public function getSurname()
115
    {
116 1
        return $this->surname;
117
    }
118
119
    /**
120
     * @param string $surname
121
     */
122 1
    public function setSurname($surname)
123
    {
124 1
        $this->surname = $surname;
125 1
    }
126
127
    /**
128
     * @return string
129
     */
130 1
    public function getCode()
131
    {
132 1
        return $this->code;
133
    }
134
135
    /**
136
     * @param string $code
137
     */
138 1
    public function setCode($code)
139
    {
140 1
        $this->code = $code;
141 1
    }
142
143
    /**
144
     * @return string
145
     */
146 1
    public function getCountry()
147
    {
148 1
        return $this->country;
149
    }
150
151
    /**
152
     * @param string $country
153
     */
154 1
    public function setCountry($country)
155
    {
156 1
        $this->country = $country;
157 1
    }
158
159
    /**
160
     * @return string
161
     */
162 1
    public function getCertificate()
163
    {
164 1
        return $this->certificate;
165
    }
166
167
    /**
168
     * @param string $certificate
169
     */
170 1
    public function setCertificate($certificate)
171
    {
172 1
        $this->certificate = $certificate;
173 1
    }
174
 
175
    /**
176
     * Gets the value of algorithm.
177
     * @return mixed
178
     */
179
    public function getAlgorithm()
180
    {
181
        return $this->algorithm;
182
    }
183
 
184
    /**
185
     * Sets the value of algorithm.
186
     * @param mixed $algorithm the algorithm
187
     * @return void
188
     */
189
    public function setAlgorithm($algorithm)
190
    {
191
        $this->algorithm = $algorithm;
192
    }
193
}
194