Total Complexity | 6 |
Total Lines | 88 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | final class Response implements \JsonSerializable |
||
6 | { |
||
7 | /** |
||
8 | * A boolean indicating whether the response was finished or not |
||
9 | * |
||
10 | * @var bool|null |
||
11 | */ |
||
12 | private $finished; |
||
13 | |||
14 | /** |
||
15 | * A mapping of HTTP headers of the response object |
||
16 | * |
||
17 | * @var array|null |
||
18 | */ |
||
19 | private $headers; |
||
20 | |||
21 | /** |
||
22 | * @var bool|null |
||
23 | */ |
||
24 | private $headersSent; |
||
25 | |||
26 | /** |
||
27 | * The HTTP status code of the response. |
||
28 | * |
||
29 | * @var int|null |
||
30 | */ |
||
31 | private $statusCode; |
||
32 | |||
33 | /** |
||
34 | * @param bool|null $finished |
||
35 | * @param array|null $headers |
||
36 | * @param bool|null $headersSent |
||
37 | * @param int|null $statusCode |
||
38 | */ |
||
39 | 3 | public function __construct( |
|
49 | 3 | } |
|
50 | |||
51 | /** |
||
52 | * @return bool|null |
||
53 | */ |
||
54 | 1 | public function finished() |
|
55 | { |
||
56 | 1 | return $this->finished; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return array|null |
||
61 | */ |
||
62 | 1 | public function headers() |
|
63 | { |
||
64 | 1 | return $this->headers; |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * @return bool|null |
||
69 | */ |
||
70 | 1 | public function headersSent() |
|
71 | { |
||
72 | 1 | return $this->headersSent; |
|
73 | } |
||
74 | |||
75 | /** |
||
76 | * @return int|null |
||
77 | */ |
||
78 | 1 | public function statusCode() |
|
81 | } |
||
82 | |||
83 | /** |
||
84 | * @return array |
||
85 | */ |
||
86 | 1 | public function jsonSerialize() |
|
93 | 1 | ]; |
|
94 | } |
||
96 |