Completed
Push — master ( c5e2a6...55323d )
by thomas
21s
created

Response::getOkMsg()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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