@@ -9,15 +9,17 @@ class Foo
99{
1010 public function bar ()
1111 {
12+ $ curlGetInfoType = '(array{url: string, content_type: string|null, http_code: int, header_size: int, request_size: int, filetime: int, ssl_verify_result: int, redirect_count: int, total_time: float, namelookup_time: float, connect_time: float, pretransfer_time: float, size_upload: float, size_download: float, speed_download: float, speed_upload: float, download_content_length: float, upload_content_length: float, starttransfer_time: float, redirect_time: float, redirect_url: string, primary_ip: string, certinfo: list<array<string, string>>, primary_port: int, local_ip: string, local_port: int, http_version: int, protocol: int, ssl_verifyresult: int, scheme: string, appconnect_time_us: int, queue_time_us: int, connect_time_us: int, namelookup_time_us: int, pretransfer_time_us: int, redirect_time_us: int, starttransfer_time_us: int, posttransfer_time_us: int, total_time_us: int, request_header: string, effective_method: string, capath: string, cainfo: string, used_proxy: int, httpauth_used: int, proxyauth_used: int, conn_id: int}|false) ' ;
13+
1214 $ handle = new CurlHandle ();
1315 assertType ('mixed ' , curl_getinfo ());
1416 assertType ('mixed ' , CURL_GETINFO ());
1517 assertType ('mixed ' , CuRl_GeTiNfO ());
1618 assertType ('false ' , curl_getinfo ($ handle , 'Invalid Argument ' ));
17- assertType (' (array{url: string, content_type: string|null, http_code: int, header_size: int, request_size: int, filetime: int, ssl_verify_result: int, redirect_count: int, total_time: float, namelookup_time: float, connect_time: float, pretransfer_time: float, size_upload: float, size_download: float, speed_download: float, speed_upload: float, download_content_length: float, upload_content_length: float, starttransfer_time: float, redirect_time: float, redirect_url: string, primary_ip: string, certinfo: array<int, array<string, string>>, primary_port: int, local_ip: string, local_port: int, http_version: int, protocol: int, ssl_verifyresult: int, scheme: string}|false) ' , curl_getinfo ($ handle , PHP_INT_MAX ));
19+ assertType ($ curlGetInfoType , curl_getinfo ($ handle , PHP_INT_MAX ));
1820 assertType ('false ' , curl_getinfo ($ handle , PHP_EOL ));
19- assertType (' (array{url: string, content_type: string|null, http_code: int, header_size: int, request_size: int, filetime: int, ssl_verify_result: int, redirect_count: int, total_time: float, namelookup_time: float, connect_time: float, pretransfer_time: float, size_upload: float, size_download: float, speed_download: float, speed_upload: float, download_content_length: float, upload_content_length: float, starttransfer_time: float, redirect_time: float, redirect_url: string, primary_ip: string, certinfo: array<int, array<string, string>>, primary_port: int, local_ip: string, local_port: int, http_version: int, protocol: int, ssl_verifyresult: int, scheme: string}|false) ' , curl_getinfo ($ handle ));
20- assertType (' (array{url: string, content_type: string|null, http_code: int, header_size: int, request_size: int, filetime: int, ssl_verify_result: int, redirect_count: int, total_time: float, namelookup_time: float, connect_time: float, pretransfer_time: float, size_upload: float, size_download: float, speed_download: float, speed_upload: float, download_content_length: float, upload_content_length: float, starttransfer_time: float, redirect_time: float, redirect_url: string, primary_ip: string, certinfo: array<int, array<string, string>>, primary_port: int, local_ip: string, local_port: int, http_version: int, protocol: int, ssl_verifyresult: int, scheme: string}|false) ' , curl_getinfo ($ handle , null ));
21+ assertType ($ curlGetInfoType , curl_getinfo ($ handle ));
22+ assertType ($ curlGetInfoType , curl_getinfo ($ handle , null ));
2123 assertType ('string ' , curl_getinfo ($ handle , CURLINFO_EFFECTIVE_URL ));
2224 assertType ('string ' , curl_getinfo ($ handle , 1048577 )); // CURLINFO_EFFECTIVE_URL int value without using constant
2325 assertType ('false ' , curl_getinfo ($ handle , 12345678 )); // Non constant non CURLINFO_* int value
@@ -29,38 +31,39 @@ public function bar()
2931 assertType ('float ' , curl_getinfo ($ handle , CURLINFO_STARTTRANSFER_TIME ));
3032 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_REDIRECT_COUNT ));
3133 assertType ('float ' , curl_getinfo ($ handle , CURLINFO_REDIRECT_TIME ));
32- assertType ('string ' , curl_getinfo ($ handle , CURLINFO_REDIRECT_URL ));
34+ assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_REDIRECT_URL ));
3335 assertType ('string ' , curl_getinfo ($ handle , CURLINFO_PRIMARY_IP ));
3436 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_PRIMARY_PORT ));
3537 assertType ('string ' , curl_getinfo ($ handle , CURLINFO_LOCAL_IP ));
3638 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_LOCAL_PORT ));
37- assertType ('int ' , curl_getinfo ($ handle , CURLINFO_SIZE_UPLOAD ));
38- assertType ('int ' , curl_getinfo ($ handle , CURLINFO_SIZE_DOWNLOAD ));
39- assertType ('int ' , curl_getinfo ($ handle , CURLINFO_SPEED_DOWNLOAD ));
40- assertType ('int ' , curl_getinfo ($ handle , CURLINFO_SPEED_UPLOAD ));
39+ assertType ('float ' , curl_getinfo ($ handle , CURLINFO_SIZE_UPLOAD ));
40+ assertType ('float ' , curl_getinfo ($ handle , CURLINFO_SIZE_DOWNLOAD ));
41+ assertType ('float ' , curl_getinfo ($ handle , CURLINFO_SPEED_DOWNLOAD ));
42+ assertType ('float ' , curl_getinfo ($ handle , CURLINFO_SPEED_UPLOAD ));
4143 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_HEADER_SIZE ));
4244 assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_HEADER_OUT ));
4345 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_REQUEST_SIZE ));
4446 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_SSL_VERIFYRESULT ));
4547 assertType ('float ' , curl_getinfo ($ handle , CURLINFO_CONTENT_LENGTH_DOWNLOAD ));
4648 assertType ('float ' , curl_getinfo ($ handle , CURLINFO_CONTENT_LENGTH_UPLOAD ));
4749 assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_CONTENT_TYPE ));
48- assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_PRIVATE ));
50+ assertType ('mixed ' , curl_getinfo ($ handle , CURLINFO_PRIVATE ));
4951 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_RESPONSE_CODE ));
52+ assertType ('int ' , curl_getinfo ($ handle , CURLINFO_HTTP_CODE ));;
5053 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_HTTP_CONNECTCODE ));
5154 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_HTTPAUTH_AVAIL ));
5255 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_PROXYAUTH_AVAIL ));
5356 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_OS_ERRNO ));
5457 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_NUM_CONNECTS ));
55- assertType ('array<int, string> ' , curl_getinfo ($ handle , CURLINFO_SSL_ENGINES ));
56- assertType ('array<int, string> ' , curl_getinfo ($ handle , CURLINFO_COOKIELIST ));
58+ assertType ('list< string> ' , curl_getinfo ($ handle , CURLINFO_SSL_ENGINES ));
59+ assertType ('list< string> ' , curl_getinfo ($ handle , CURLINFO_COOKIELIST ));
5760 assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_FTP_ENTRY_PATH ));
5861 assertType ('float ' , curl_getinfo ($ handle , CURLINFO_APPCONNECT_TIME ));
59- assertType ('array<int, array<string, string>> ' , curl_getinfo ($ handle , CURLINFO_CERTINFO ));
62+ assertType ('list< array<string, string>> ' , curl_getinfo ($ handle , CURLINFO_CERTINFO ));
6063 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_CONDITION_UNMET ));
6164 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_RTSP_CLIENT_CSEQ ));
6265 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_RTSP_CSEQ_RECV ));
6366 assertType ('int ' , curl_getinfo ($ handle , CURLINFO_RTSP_SERVER_CSEQ ));
64- assertType ('int ' , curl_getinfo ($ handle , CURLINFO_RTSP_SESSION_ID ));
67+ assertType ('string|false ' , curl_getinfo ($ handle , CURLINFO_RTSP_SESSION_ID ));
6568 }
6669}
0 commit comments