InquiryResponse::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Nexylan packages.
5
 *
6
 * (c) Nexylan SAS <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Nexy\PayboxDirect\Response;
13
14
/**
15
 * Special response for inquiry request.
16
 *
17
 * @author Sullivan Senechal <[email protected]>
18
 */
19
final class InquiryResponse extends AbstractResponse
20
{
21
    /**
22
     * @var string
23
     */
24
    private $status;
25
26
    /**
27
     * @var string|null
28
     */
29
    private $discount = null;
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function __construct($parameters)
35
    {
36
        parent::__construct($parameters);
37
38
        $this->status = $this->filteredParameters['STATUS'];
39
40
        if (array_key_exists('REMISE', $this->filteredParameters)) {
41
            $this->discount = $this->filteredParameters['REMISE'];
42
        }
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getStatus()
49
    {
50
        return $this->status;
51
    }
52
53
    /**
54
     * @return string|null
55
     */
56
    public function getDiscount()
57
    {
58
        return $this->discount;
59
    }
60
}
61