| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Response |
||
| 8 | { |
||
| 9 | private bool $errorStatus = false; |
||
| 10 | private string $errorMessage = ""; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get error status |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | public function getErrorStatus(): bool |
||
| 17 | { |
||
| 18 | return $this->errorStatus; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get error message |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | public function getErrorMessage() :string |
||
| 26 | { |
||
| 27 | return $this->errorMessage; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * set error status |
||
| 32 | * @param bool $errorStatus |
||
| 33 | * @return Response |
||
| 34 | */ |
||
| 35 | public function setErrorStatus(bool $errorStatus): Response |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Set error message |
||
| 43 | * @param string $errorMessage |
||
| 44 | * @return Response |
||
| 45 | */ |
||
| 46 | public function setErrorMessage(string $errorMessage): Response |
||
| 50 | } |
||
| 51 | } |