Completed
Pull Request — develop (#9)
by
unknown
03:41
created

SmartIdResult::setToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Isign\Login;
3
4
use Isign\ResultInterface;
5
6
/**
7
 * Result object for Smart ID login response.
8
 */
9 View Code Duplication
class SmartIdResult implements ResultInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    /** @var string response status */
12
    private $status;
13
14
    /** @var string control code to display for user */
15
    private $controlCode;
16
17
    /** @var string token for mobile status query */
18
    private $token;
19
20
    /**
21
     * Fields expected in response
22
     * @return array
23
     */
24 3
    public function getFields()
25
    {
26
        return [
27 3
            'status',
28 3
            'token',
29 3
            'control_code',
30 3
        ];
31
    }
32
    
33
    /**
34
     * Set status
35
     * @param string $status
36
     * @return void
37
     */
38 1
    public function setStatus($status)
39
    {
40 1
        $this->status = $status;
41 1
    }
42
43
    /**
44
     * Get status
45
     * @return string
46
     */
47 1
    public function getStatus()
48
    {
49 1
        return $this->status;
50
    }
51
52
    /**
53
     * Set control code
54
     * @param string $controlCode
55
     * @return void
56
     */
57 1
    public function setControlCode($controlCode)
58
    {
59 1
        $this->controlCode = $controlCode;
60 1
    }
61
62
    /**
63
     * Get control code
64
     * @return string
65
     */
66 1
    public function getControlCode()
67
    {
68 1
        return $this->controlCode;
69
    }
70
71
    /**
72
     * Set token
73
     * @param string $token
74
     * @return void
75
     */
76 1
    public function setToken($token)
77
    {
78 1
        $this->token = $token;
79 1
    }
80
81
    /**
82
     * Get token
83
     * @return string
84
     */
85 1
    public function getToken()
86
    {
87 1
        return $this->token;
88
    }
89
}
90