| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 61.53% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | abstract class AbstractLazyHttpResponse implements LazyResponseInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | protected $status; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $headers; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * AbstractLazyHttpResponse constructor. |
||
| 25 | */ |
||
| 26 | 6 | public function __construct(int $status = Response::HTTP_OK, array $headers = []) |
|
| 30 | 6 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return int |
||
| 34 | * @deprecated will be removed with version 2.0. use getStatusCode instead. |
||
| 35 | */ |
||
| 36 | public function getStatus(): int |
||
| 37 | { |
||
| 38 | @trigger_error( |
||
| 39 | 'Using AbstractLazyHttpResponse::getStatus() is deprecated since version 1.2, use "AbstractLazyHttpResponse::getStatusCode()" instead.', |
||
| 40 | E_USER_DEPRECATED |
||
| 41 | ); |
||
| 42 | |||
| 43 | return $this->getStatusCode(); |
||
| 44 | } |
||
| 45 | |||
| 46 | 6 | public function getHeaders(): array |
|
| 47 | { |
||
| 48 | 6 | return $this->headers; |
|
| 49 | } |
||
| 50 | |||
| 51 | 6 | public function getStatusCode(): int |
|
| 54 | } |
||
| 55 | } |
||
| 56 |