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