| Total Complexity | 5 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class SimpleResponse implements ResponseInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private string $httpBody; |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private int $httpCode; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $httpBody |
||
| 23 | * @param int $httpCode |
||
| 24 | */ |
||
| 25 | 4 | public function __construct(string $httpBody, int $httpCode) |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 3 | public function getHttpBody(): string |
|
| 35 | { |
||
| 36 | 3 | return $this->httpBody; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $httpBody |
||
| 41 | * |
||
| 42 | * @return SimpleResponse |
||
| 43 | */ |
||
| 44 | 1 | public function setHttpBody(string $httpBody): SimpleResponse |
|
| 45 | { |
||
| 46 | 1 | $this->httpBody = $httpBody; |
|
| 47 | 1 | return $this; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return int |
||
| 52 | */ |
||
| 53 | 2 | public function getHttpCode(): int |
|
| 54 | { |
||
| 55 | 2 | return $this->httpCode; |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param int $httpCode |
||
| 60 | * |
||
| 61 | * @return SimpleResponse |
||
| 62 | */ |
||
| 63 | 1 | public function setHttpCode(int $httpCode): SimpleResponse |
|
| 67 | } |
||
| 68 | } |
||
| 69 |