77/**
88 * Copies a cURL handle keeping the same preferences.
99 *
10- * @param resource $handle A cURL handle returned by
10+ * @param \CurlHandle $handle A cURL handle returned by
1111 * curl_init.
12- * @return resource Returns a new cURL handle.
12+ * @return \CurlHandle Returns a new cURL handle.
1313 * @throws CurlException
1414 *
1515 */
16- function curl_copy_handle ($ handle )
16+ function curl_copy_handle (\ CurlHandle $ handle ): \ CurlHandle
1717{
1818 error_clear_last ();
1919 $ result = \curl_copy_handle ($ handle );
@@ -27,14 +27,14 @@ function curl_copy_handle($handle)
2727/**
2828 * This function URL encodes the given string according to RFC 3986.
2929 *
30- * @param resource $handle A cURL handle returned by
30+ * @param \CurlHandle $handle A cURL handle returned by
3131 * curl_init.
3232 * @param string $string The string to be encoded.
3333 * @return string Returns escaped string.
3434 * @throws CurlException
3535 *
3636 */
37- function curl_escape ($ handle , string $ string ): string
37+ function curl_escape (\ CurlHandle $ handle , string $ string ): string
3838{
3939 error_clear_last ();
4040 $ result = \curl_escape ($ handle , $ string );
@@ -51,15 +51,15 @@ function curl_escape($handle, string $string): string
5151 * This function should be called after initializing a cURL session and all
5252 * the options for the session are set.
5353 *
54- * @param resource $handle A cURL handle returned by
54+ * @param \CurlHandle $handle A cURL handle returned by
5555 * curl_init.
5656 * @return bool|string Returns TRUE on success. However, if the CURLOPT_RETURNTRANSFER
5757 * option is set, it will return
5858 * the result on success, FALSE on failure.
5959 * @throws CurlException
6060 *
6161 */
62- function curl_exec ($ handle )
62+ function curl_exec (\ CurlHandle $ handle )
6363{
6464 error_clear_last ();
6565 $ result = \curl_exec ($ handle );
@@ -73,7 +73,7 @@ function curl_exec($handle)
7373/**
7474 * Gets information about the last transfer.
7575 *
76- * @param resource $handle A cURL handle returned by
76+ * @param \CurlHandle $handle A cURL handle returned by
7777 * curl_init.
7878 * @param int $option This may be one of the following constants:
7979 *
@@ -532,7 +532,7 @@ function curl_exec($handle)
532532 * @throws CurlException
533533 *
534534 */
535- function curl_getinfo ($ handle , int $ option = null )
535+ function curl_getinfo (\ CurlHandle $ handle , int $ option = null )
536536{
537537 error_clear_last ();
538538 if ($ option !== null ) {
@@ -587,7 +587,7 @@ function curl_init(string $url = null): \CurlHandle
587587 * queued_messages will contain the number of remaining messages after this
588588 * function was called.
589589 *
590- * @param resource $multi_handle A cURL multi handle returned by
590+ * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by
591591 * curl_multi_init.
592592 * @param int|null $queued_messages Number of messages that are still in the queue
593593 * @return array On success, returns an associative array for the message, FALSE on failure.
@@ -622,7 +622,7 @@ function curl_init(string $url = null): \CurlHandle
622622 * @throws CurlException
623623 *
624624 */
625- function curl_multi_info_read ($ multi_handle , ?int &$ queued_messages = null ): array
625+ function curl_multi_info_read (\ CurlMultiHandle $ multi_handle , ?int &$ queued_messages = null ): array
626626{
627627 error_clear_last ();
628628 $ result = \curl_multi_info_read ($ multi_handle , $ queued_messages );
@@ -636,11 +636,11 @@ function curl_multi_info_read($multi_handle, ?int &$queued_messages = null): arr
636636/**
637637 * Allows the processing of multiple cURL handles asynchronously.
638638 *
639- * @return resource Returns a cURL multi handle on success, FALSE on failure.
639+ * @return \CurlMultiHandle Returns a cURL multi handle on success, FALSE on failure.
640640 * @throws CurlException
641641 *
642642 */
643- function curl_multi_init ()
643+ function curl_multi_init (): \ CurlMultiHandle
644644{
645645 error_clear_last ();
646646 $ result = \curl_multi_init ();
@@ -654,7 +654,7 @@ function curl_multi_init()
654654/**
655655 *
656656 *
657- * @param resource $multi_handle
657+ * @param \CurlMultiHandle $multi_handle
658658 * @param int $option One of the CURLMOPT_* constants.
659659 * @param mixed $value The value to be set on option.
660660 *
@@ -786,7 +786,7 @@ function curl_multi_init()
786786 * @throws CurlException
787787 *
788788 */
789- function curl_multi_setopt ($ multi_handle , int $ option , $ value ): void
789+ function curl_multi_setopt (\ CurlMultiHandle $ multi_handle , int $ option , $ value ): void
790790{
791791 error_clear_last ();
792792 $ result = \curl_multi_setopt ($ multi_handle , $ option , $ value );
@@ -799,7 +799,7 @@ function curl_multi_setopt($multi_handle, int $option, $value): void
799799/**
800800 * Sets an option on the given cURL session handle.
801801 *
802- * @param resource $handle A cURL handle returned by
802+ * @param \CurlHandle $handle A cURL handle returned by
803803 * curl_init.
804804 * @param int $option The CURLOPT_XXX option to set.
805805 * @param mixed $value The value to be set on option.
@@ -3137,7 +3137,7 @@ function curl_multi_setopt($multi_handle, int $option, $value): void
31373137 * @throws CurlException
31383138 *
31393139 */
3140- function curl_setopt ($ handle , int $ option , $ value ): void
3140+ function curl_setopt (\ CurlHandle $ handle , int $ option , $ value ): void
31413141{
31423142 error_clear_last ();
31433143 $ result = \curl_setopt ($ handle , $ option , $ value );
@@ -3150,13 +3150,13 @@ function curl_setopt($handle, int $option, $value): void
31503150/**
31513151 * Return an integer containing the last share curl error number.
31523152 *
3153- * @param resource $share_handle A cURL share handle returned by
3153+ * @param \CurlShareHandle $share_handle A cURL share handle returned by
31543154 * curl_share_init.
31553155 * @return int Returns an integer containing the last share curl error number.
31563156 * @throws CurlException
31573157 *
31583158 */
3159- function curl_share_errno ($ share_handle ): int
3159+ function curl_share_errno (\ CurlShareHandle $ share_handle ): int
31603160{
31613161 error_clear_last ();
31623162 $ result = \curl_share_errno ($ share_handle );
@@ -3170,7 +3170,7 @@ function curl_share_errno($share_handle): int
31703170/**
31713171 * Sets an option on the given cURL share handle.
31723172 *
3173- * @param resource $share_handle A cURL share handle returned by
3173+ * @param \CurlShareHandle $share_handle A cURL share handle returned by
31743174 * curl_share_init.
31753175 * @param int $option
31763176 *
@@ -3233,7 +3233,7 @@ function curl_share_errno($share_handle): int
32333233 * @throws CurlException
32343234 *
32353235 */
3236- function curl_share_setopt ($ share_handle , int $ option , $ value ): void
3236+ function curl_share_setopt (\ CurlShareHandle $ share_handle , int $ option , $ value ): void
32373237{
32383238 error_clear_last ();
32393239 $ result = \curl_share_setopt ($ share_handle , $ option , $ value );
@@ -3246,14 +3246,14 @@ function curl_share_setopt($share_handle, int $option, $value): void
32463246/**
32473247 * This function decodes the given URL encoded string.
32483248 *
3249- * @param resource $handle A cURL handle returned by
3249+ * @param \CurlHandle $handle A cURL handle returned by
32503250 * curl_init.
32513251 * @param string $string The URL encoded string to be decoded.
32523252 * @return string Returns decoded string.
32533253 * @throws CurlException
32543254 *
32553255 */
3256- function curl_unescape ($ handle , string $ string ): string
3256+ function curl_unescape (\ CurlHandle $ handle , string $ string ): string
32573257{
32583258 error_clear_last ();
32593259 $ result = \curl_unescape ($ handle , $ string );
0 commit comments