Completed
Push — master ( 4dc014...648604 )
by Sullivan
02:36
created

InquiryResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 42
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatus() 0 4 1
A getDiscount() 0 4 1
A __construct() 0 10 2
1
<?php
2
3
namespace Nexy\PayboxDirect\Response;
4
5
/**
6
 * Special response for inquiry request.
7
 *
8
 * @author Sullivan Senechal <[email protected]>
9
 */
10
final class InquiryResponse extends AbstractResponse
11
{
12
    /**
13
     * @var string
14
     */
15
    private $status;
16
17
    /**
18
     * @var string|null
19
     */
20
    private $discount = null;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function __construct($parameters)
26
    {
27
        parent::__construct($parameters);
28
29
        $this->status = $this->filteredParameters['STATUS'];
30
31
        if (array_key_exists('REMISE', $this->filteredParameters)) {
32
            $this->discount = $this->filteredParameters['REMISE'];
33
        }
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getStatus()
40
    {
41
        return $this->status;
42
    }
43
44
    /**
45
     * @return string|null
46
     */
47
    public function getDiscount()
48
    {
49
        return $this->discount;
50
    }
51
}
52