1 | <?php |
||
13 | class RestApiBrowser |
||
14 | { |
||
15 | /** @var Http\Client\HttpClient */ |
||
16 | private $httpClient; |
||
17 | |||
18 | /** @var RequestInterface */ |
||
19 | private $request; |
||
20 | |||
21 | /** @var ResponseInterface */ |
||
22 | private $response; |
||
23 | |||
24 | /** @var array */ |
||
25 | private $requestHeaders = []; |
||
26 | |||
27 | /** @var ResponseStorage */ |
||
28 | private $responseStorage; |
||
29 | |||
30 | /** @var string */ |
||
31 | private $host; |
||
32 | |||
33 | /** @var MessageFactoryDiscovery */ |
||
34 | private $messageFactory; |
||
35 | |||
36 | /** |
||
37 | * @param string $host |
||
38 | */ |
||
39 | public function __construct($host, HttpClient $httpClient = null) |
||
45 | |||
46 | /** |
||
47 | * @param ResponseStorage $responseStorage |
||
48 | */ |
||
49 | public function enableResponseStorage(ResponseStorage $responseStorage) |
||
53 | |||
54 | /** |
||
55 | * @return ResponseInterface |
||
56 | */ |
||
57 | public function getResponse() |
||
61 | |||
62 | /** |
||
63 | * @param ResponseInterface $response |
||
64 | */ |
||
65 | public function setResponse(ResponseInterface $response) |
||
69 | |||
70 | public function getRequest() |
||
74 | |||
75 | public function getRequestHeaders() |
||
79 | |||
80 | /** |
||
81 | * @return Http\Client\HttpClient |
||
82 | */ |
||
83 | public function getHttpClient() |
||
87 | |||
88 | /** |
||
89 | * @param string $method |
||
90 | * @param string $uri |
||
91 | * @param string|array $body |
||
92 | */ |
||
93 | public function sendRequest($method, $uri, $body = null) |
||
106 | |||
107 | /** |
||
108 | * @param string $uri |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | private function hasHost($uri) |
||
116 | |||
117 | /** |
||
118 | * @param string $name |
||
119 | * @param string $value |
||
120 | */ |
||
121 | public function setRequestHeader($name, $value) |
||
126 | |||
127 | /** |
||
128 | * @param string $headerName |
||
129 | */ |
||
130 | private function removeRequestHeader($headerName) |
||
136 | |||
137 | /** |
||
138 | * @param string $name |
||
139 | * @param string $value |
||
140 | */ |
||
141 | public function addRequestHeader($name, $value) |
||
149 | } |
||
150 |
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..