ReceiveResponse::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Cryptommer\Smsir\Objects;
4
5
use Psr\Http\Message\StreamInterface;
6
7
class ReceiveResponse {
8
9
10
    /**
11
     * @var String
12
     */
13
    public string $Status;
14
15
    /**
16
     * @var string
17
     */
18
    public string $Message;
19
20
    /**
21
     * @var ReceiveData[]
22
     */
23
    public array $Data;
24
25
    public function __construct($response) {
26
        $this->Status = $response['status'];
27
        $this->Message = $response['message'];
28
        foreach ($response['data'] as $data) {
29
            $this->Data[] = new ReceiveData($data);
30
        }
31
    }
32
33
    /**
34
     * @return ReceiveData[]
35
     */
36
    public function getData(): array {
37
        return $this->Data;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getMessage(): string {
44
        return $this->Message;
45
    }
46
47
    /**
48
     * @return String
49
     */
50
    public function getStatus(): string {
51
        return $this->Status;
52
    }
53
54
}
55