Completed
Pull Request — master (#32)
by Sullivan
02:30
created

AbstractResponse::getRank()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Nexy\PayboxDirect\Response;
4
5
/**
6
 * @author Sullivan Senechal <[email protected]>
7
 */
8
abstract class AbstractResponse implements ResponseInterface
9
{
10
    /**
11
     * @var int
12
     */
13
    private $code;
14
15
    /**
16
     * @var string
17
     */
18
    private $comment;
19
20
    /**
21
     * @var string
22
     */
23
    private $site;
24
25
    /**
26
     * @var string
27
     */
28
    private $rank;
29
30
    /**
31
     * @var int
32
     */
33
    private $callNumber;
34
35
    /**
36
     * @var int
37
     */
38
    private $questionNumber;
39
40
    /**
41
     * @var int
42
     */
43
    private $transactionNumber;
44
45
    /**
46
     * @param string[] $data
47
     */
48
    public function __construct(array $data)
49
    {
50
        $this->code = intval($data['CODEREPONSE']);
51
        $this->comment = $data['COMMENTAIRE'];
52
        $this->site = $data['SITE'];
53
        $this->rank = $data['RANG'];
54
        $this->callNumber = intval($data['NUMAPPEL']);
55
        $this->questionNumber = intval($data['NUMQUESTION']);
56
        $this->transactionNumber = intval($data['NUMTRANS']);
57
    }
58
59
    /**
60
     * @return int
61
     */
62
    public function getCode()
63
    {
64
        return $this->code;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getComment()
71
    {
72
        return $this->comment;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getSite()
79
    {
80
        return $this->site;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getRank()
87
    {
88
        return $this->rank;
89
    }
90
91
    /**
92
     * @return int
93
     */
94
    public function getCallNumber()
95
    {
96
        return $this->callNumber;
97
    }
98
99
    /**
100
     * @return int
101
     */
102
    public function getQuestionNumber()
103
    {
104
        return $this->questionNumber;
105
    }
106
107
    /**
108
     * @return int
109
     */
110
    public function getTransactionNumber()
111
    {
112
        return $this->transactionNumber;
113
    }
114
}
115