Response   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 56
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getComments() 0 3 1
A __construct() 0 10 1
A getOkMsg() 0 3 1
A getStatuses() 0 3 1
A getData() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\PinEntry;
6
7
class Response
8
{
9
    /**
10
     * Ok Message is debugging information provided after the OK message.
11
     * @var null|string
12
     */
13
    private $okMsg;
14
15
    /**
16
     * Continuous data stream built up response start to OK
17
     * @var string[]
18
     */
19
    private $data;
20
21
    /**
22
     * Stream of statuses passed back in the response.
23
     * @var array
24
     */
25
    private $statuses;
26
27
    /**
28
     * List of comments returned in the response
29
     * @var string[]
30
     */
31
    private $comments = [];
32
33 5
    public function __construct(
34
        array $data = [],
35
        array $statuses = [],
36
        array $comments = [],
37
        string $okMsg = null
38
    ) {
39 5
        $this->data = $data;
40 5
        $this->statuses = $statuses;
41 5
        $this->comments = $comments;
42 5
        $this->okMsg = $okMsg;
43 5
    }
44
45 5
    public function getComments(): array
46
    {
47 5
        return $this->comments;
48
    }
49
50 5
    public function getData(): array
51
    {
52 5
        return $this->data;
53
    }
54
55 5
    public function getStatuses(): array
56
    {
57 5
        return $this->statuses;
58
    }
59
60 5
    public function getOkMsg()
61
    {
62 5
        return $this->okMsg;
63
    }
64
}
65