Total Complexity | 5 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 { |
||
52 | } |
||
53 | |||
54 | } |
||
55 |