Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | final class Response |
||
9 | { |
||
10 | private $success; |
||
11 | |||
12 | private $type; |
||
13 | |||
14 | private $message; |
||
15 | |||
16 | 6 | public function __construct(string $type, string $message) |
|
17 | { |
||
18 | 6 | $this->success = $type !== 'ERR'; |
|
19 | 6 | $this->type = $type; |
|
20 | 6 | $this->message = $message; |
|
21 | 6 | } |
|
22 | |||
23 | |||
24 | 5 | public function getSuccess(): ?bool |
|
27 | } |
||
28 | |||
29 | 5 | public function getType(): string |
|
30 | { |
||
31 | 5 | return $this->type; |
|
32 | } |
||
33 | |||
34 | 5 | public function getMessage(): string |
|
37 | } |
||
38 | } |
||
39 |