1 | <?php |
||
18 | class Request{ |
||
19 | |||
20 | /** |
||
21 | * The cURL connection |
||
22 | * |
||
23 | * @var resource |
||
24 | */ |
||
25 | protected $curl; |
||
26 | |||
27 | /** |
||
28 | * @var \chillerlan\TinyCurl\RequestOptions |
||
29 | */ |
||
30 | protected $options; |
||
31 | |||
32 | /** |
||
33 | * Request constructor. |
||
34 | * |
||
35 | * @param \chillerlan\TinyCurl\RequestOptions $options |
||
|
|||
36 | */ |
||
37 | public function __construct(RequestOptions $options = null){ |
||
40 | |||
41 | /** |
||
42 | * @param \chillerlan\TinyCurl\RequestOptions $options |
||
43 | * |
||
44 | * @return \chillerlan\TinyCurl\Request |
||
45 | */ |
||
46 | public function setOptions(RequestOptions $options):Request { |
||
51 | |||
52 | /** |
||
53 | * @return \chillerlan\TinyCurl\RequestOptions |
||
54 | */ |
||
55 | public function getOptions():RequestOptions{ |
||
58 | |||
59 | /** |
||
60 | * @param string $url |
||
61 | * |
||
62 | * @return \chillerlan\TinyCurl\ResponseInterface |
||
63 | */ |
||
64 | protected function getResponse(string $url):ResponseInterface { |
||
69 | |||
70 | /** |
||
71 | * @return void |
||
72 | */ |
||
73 | protected function initCurl(){ |
||
89 | |||
90 | /** |
||
91 | * @param \chillerlan\TinyCurl\URL $url |
||
92 | * @param array|null $curl_options |
||
93 | * |
||
94 | * @return \chillerlan\TinyCurl\ResponseInterface |
||
95 | */ |
||
96 | public function fetch(URL $url, array $curl_options = []):ResponseInterface { |
||
139 | |||
140 | /** |
||
141 | * @param array $headers |
||
142 | * |
||
143 | * @return array |
||
144 | */ |
||
145 | public function normalizeHeaders(array $headers):array { |
||
169 | |||
170 | /** |
||
171 | * @param string $url |
||
172 | * |
||
173 | * @return array<string> |
||
174 | */ |
||
175 | public function extractShortUrl(string $url):array { |
||
184 | |||
185 | /** |
||
186 | * @param string $url |
||
187 | * |
||
188 | * @return string |
||
189 | * @link http://www.internoetics.com/2012/11/12/resolve-short-urls-to-their-destination-url-php-api/ |
||
190 | */ |
||
191 | protected function extract(string $url):string { |
||
218 | |||
219 | } |
||
220 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.