ResponseReadStatus   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 9
c 1
b 0
f 0
dl 0
loc 36
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatusName() 0 3 1
A getStatusId() 0 3 1
A parseContents() 0 8 3
1
<?php
2
3
namespace Graze\WipotecCheckweigherClient\Response;
4
5
class ResponseReadStatus extends AbstractResponse
6
{
7
    /** @var int */
8
    private $statusId;
9
10
    /** @var string */
11
    private $statusName;
12
13
    /**
14
     * @param mixed[] $contents
15
     */
16
    protected function parseContents(array $contents)
17
    {
18
        if (isset($contents['status']['status_id'])) {
19
            $this->statusId = $contents['status']['status_id'];
20
        }
21
22
        if (isset($contents['status']['status_name'])) {
23
            $this->statusName = $contents['status']['status_name'];
24
        }
25
    }
26
27
    /**
28
     * @return int
29
     */
30
    public function getStatusId()
31
    {
32
        return $this->statusId;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getStatusName()
39
    {
40
        return $this->statusName;
41
    }
42
}
43