1 | <?php |
||
11 | class RestApiBrowser |
||
12 | { |
||
13 | /** @var Http\Client\HttpClient */ |
||
14 | private $httpClient; |
||
15 | |||
16 | /** @var RequestInterface */ |
||
17 | private $request; |
||
18 | |||
19 | /** @var ResponseInterface */ |
||
20 | private $response; |
||
21 | |||
22 | /** @var array */ |
||
23 | private $requestHeaders = []; |
||
24 | |||
25 | /** @var ResponseStorage */ |
||
26 | private $responseStorage; |
||
27 | |||
28 | /** @var string */ |
||
29 | private $host; |
||
30 | |||
31 | /** @var MessageFactoryDiscovery */ |
||
32 | private $messageFactory; |
||
33 | |||
34 | /** |
||
35 | * @param string $host |
||
36 | */ |
||
37 | public function __construct($host, HttpClient $httpClient = null) |
||
43 | |||
44 | /** |
||
45 | * @param ResponseStorage $responseStorage |
||
46 | */ |
||
47 | public function enableResponseStorage(ResponseStorage $responseStorage) |
||
51 | |||
52 | /** |
||
53 | * @return ResponseInterface |
||
54 | */ |
||
55 | public function getResponse() |
||
59 | |||
60 | /** |
||
61 | * @param ResponseInterface $response |
||
62 | */ |
||
63 | public function setResponse(ResponseInterface $response) |
||
67 | |||
68 | public function getRequest() |
||
72 | |||
73 | public function getRequestHeaders() |
||
77 | |||
78 | /** |
||
79 | * @return Http\Client\HttpClient |
||
80 | */ |
||
81 | public function getHttpClient() |
||
85 | |||
86 | /** |
||
87 | * @param string $method |
||
88 | * @param string $uri |
||
89 | * @param string|array $body |
||
90 | */ |
||
91 | public function sendRequest($method, $uri, $body = null) |
||
104 | |||
105 | /** |
||
106 | * @param string $uri |
||
107 | * |
||
108 | * @return bool |
||
109 | */ |
||
110 | private function hasHost($uri) |
||
114 | |||
115 | /** |
||
116 | * @param string $name |
||
117 | * @param string $value |
||
118 | */ |
||
119 | public function setRequestHeader($name, $value) |
||
124 | |||
125 | /** |
||
126 | * @param string $headerName |
||
127 | */ |
||
128 | private function removeRequestHeader($headerName) |
||
134 | |||
135 | /** |
||
136 | * @param string $name |
||
137 | * @param string $value |
||
138 | */ |
||
139 | public function addRequestHeader($name, $value) |
||
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..