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

AbstractResponse::getTransactionNumber()   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 int
22
     */
23
    private $callNumber;
24
25
    /**
26
     * @var int
27
     */
28
    private $questionNumber;
29
30
    /**
31
     * @var int
32
     */
33
    private $transactionNumber;
34
35
    /**
36
     * @param string[] $data
37
     */
38
    public function __construct(array $data)
39
    {
40
        $this->code = intval($data['CODEREPONSE']);
41
        $this->comment = $data['COMMENTAIRE'];
42
        $this->callNumber = intval($data['NUMAPPEL']);
43
        $this->questionNumber = intval($data['NUMQUESTION']);
44
        $this->transactionNumber = intval($data['NUMTRANS']);
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getCode()
51
    {
52
        return $this->code;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getComment()
59
    {
60
        return $this->comment;
61
    }
62
63
    /**
64
     * @return int
65
     */
66
    public function getCallNumber()
67
    {
68
        return $this->callNumber;
69
    }
70
71
    /**
72
     * @return int
73
     */
74
    public function getQuestionNumber()
75
    {
76
        return $this->questionNumber;
77
    }
78
79
    /**
80
     * @return int
81
     */
82
    public function getTransactionNumber()
83
    {
84
        return $this->transactionNumber;
85
    }
86
}
87