1 | <?php |
||
13 | final class Response implements ApplicationPsr7ResponseInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $code = IResponse::S200_OK; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $headers = []; |
||
25 | |||
26 | /** |
||
27 | * @var StreamInterface |
||
28 | */ |
||
29 | private $stream; |
||
30 | |||
31 | public function send(IRequest $httpRequest, IResponse $httpResponse) |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * @param string|string[] $value |
||
43 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
44 | */ |
||
45 | public function withHeader($name, $value): Response |
||
51 | |||
52 | public function getBody(): StreamInterface |
||
59 | |||
60 | /** |
||
61 | * @param int $code |
||
62 | * @param string $reasonPhrase |
||
63 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
64 | */ |
||
65 | public function withStatus($code, $reasonPhrase = ''): Response |
||
71 | |||
72 | public function withBody(StreamInterface $body): Response |
||
78 | |||
79 | public function getProtocolVersion() |
||
83 | |||
84 | /** |
||
85 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
86 | */ |
||
87 | public function withProtocolVersion($version) |
||
91 | |||
92 | public function getHeaders() |
||
96 | |||
97 | /** |
||
98 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
99 | */ |
||
100 | public function hasHeader($name) |
||
104 | |||
105 | /** |
||
106 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
107 | */ |
||
108 | public function getHeader($name) |
||
112 | |||
113 | /** |
||
114 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
115 | */ |
||
116 | public function getHeaderLine($name) |
||
120 | |||
121 | /** |
||
122 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
123 | */ |
||
124 | public function withAddedHeader($name, $value) |
||
128 | |||
129 | /** |
||
130 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint |
||
131 | */ |
||
132 | public function withoutHeader($name) |
||
136 | |||
137 | public function getStatusCode() |
||
141 | |||
142 | public function getReasonPhrase() |
||
146 | |||
147 | } |
||
148 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..