1 | <?php |
||
20 | class ManualResponse extends AbstractResponse |
||
21 | { |
||
22 | /** |
||
23 | * @var mixed |
||
24 | */ |
||
25 | protected $data; |
||
26 | |||
27 | /** |
||
28 | * @var array[] |
||
29 | */ |
||
30 | protected $headers = []; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $statusCode; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $reasonPhrase; |
||
41 | |||
42 | /** |
||
43 | * @param AbstractRequest $request |
||
44 | * @param mixed $data |
||
45 | * @param array $headers |
||
46 | * @param string $statusCode |
||
47 | * @param string $reasonPhrase |
||
48 | */ |
||
49 | public function __construct(RequestInterface $request, $data, array $headers = [], $statusCode = null, $reasonPhrase = null) |
||
57 | |||
58 | /** |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function getData() |
||
65 | |||
66 | /** |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function getRawData() |
||
73 | |||
74 | /** |
||
75 | * @param string $name the header name |
||
76 | * @return array|null |
||
77 | */ |
||
78 | public function getHeader($name) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function getStatusCode() |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getReasonPhrase() |
||
98 | |||
99 | /** |
||
100 | * Returns array of all headers. |
||
101 | * Key - Header name |
||
102 | * Value - array of header values. For example:. |
||
103 | * |
||
104 | * ```php |
||
105 | * ['Location' => ['http://example.com'], 'Expires' => ['Thu, 01 Jan 1970 00:00:00 GMT']] |
||
106 | * @return array |
||
107 | */ |
||
108 | public function getHeaders() |
||
112 | } |
||
113 |
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..