Skip to content

Commit 19ef450

Browse files
authored
Merge pull request #315 from thecodingmachine/curl_init
Curl init
2 parents 8e60522 + 97ff9ab commit 19ef450

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

generated/curl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,11 @@ function curl_getinfo($handle, int $option = null)
558558
*
559559
* The file protocol is disabled by cURL if
560560
* open_basedir is set.
561-
* @return resource Returns a cURL handle on success, FALSE on errors.
561+
* @return \CurlHandle Returns a cURL handle on success, FALSE on errors.
562562
* @throws CurlException
563563
*
564564
*/
565-
function curl_init(string $url = null)
565+
function curl_init(string $url = null): \CurlHandle
566566
{
567567
error_clear_last();
568568
if ($url !== null) {

generator/src/PhpStanFunctions/CustomPhpStanFunctionMap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
'pg_pconnect' => ['resource|false', 'connection_string'=>'string', 'flags' => 'int'], //flags is an int instead of a string
1515
'get_headers' => ['array|false', 'url'=>'string', 'format='=>'bool', 'context='=>'resource'], // format is a bool instead of int
1616
'imagegrabwindow' => ['GdImage|false', 'handle'=>'int', 'client_area'=>'bool'], // client_ara is a bool instead of an int
17+
'curl_init' => ['CurlHandle|false', 'url'=>'string'], // the return value is a CurlHandle instead of a resource
1718
];

0 commit comments

Comments
 (0)