Test Failed
Pull Request — develop (#32)
by Yuji
11:42
created

UpdateOrderStatusResponse   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 69
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setData() 0 10 2
A status() 0 4 1
A warningCode() 0 4 1
A warningMessage() 0 4 1
A warningDetail() 0 4 1
1
<?php
2
3
4
namespace Shippinno\YahooShoppingJp\Response;
5
6
7
class UpdateOrderStatusResponse extends AbstractResponse
8
{
9
10
    /**
11
     * @var string
12
     */
13
    private $status;
14
15
    /**
16
     * @var string
17
     */
18
    private $warningCode = '';
19
20
    /**
21
     * @var string
22
     */
23
    private $warningMessage = '';
24
25
    /**
26
     * @var string
27
     */
28
    private $warningDetail = '';
29
30
    /**
31
     * @param array $data
32
     */
33
    public function setData($data)
34
    {
35
        $this->status = $data['Status'];
36
37
        if (isset($data['Warning'])) {
38
            $this->warningCode = $data['Warning']['Code'];
39
            $this->warningMessage = $data['Warning']['Message'];
40
            $this->warningDetail = $data['Warning']['Detail'];
41
        }
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function status(): string
48
    {
49
        return $this->status;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function warningCode(): string
56
    {
57
        return $this->warningCode;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function warningMessage(): string
64
    {
65
        return $this->warningMessage;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function warningDetail(): string
72
    {
73
        return $this->warningDetail;
74
    }
75
}