Skip to content

Commit f6024a9

Browse files
committed
Improve parameter names in ext/curl
Closes GH-6155
1 parent 56fb686 commit f6024a9

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

ext/curl/curl.stub.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $va
3333

3434
function curl_exec(CurlHandle $handle): string|bool {}
3535

36-
function curl_file_create(string $filename, ?string $mimetype = null, ?string $postname = null): CURLFile {}
36+
function curl_file_create(string $filename, ?string $mime_type = null, ?string $posted_filename = null): CURLFile {}
3737

3838
function curl_getinfo(CurlHandle $handle, ?int $option = null): mixed {}
3939

@@ -50,19 +50,19 @@ function curl_multi_exec(CurlMultiHandle $multi_handle, &$still_running): int {}
5050

5151
function curl_multi_getcontent(CurlHandle $multi_handle): ?string {}
5252

53-
/** @param int|null $msgs_in_queue */
54-
function curl_multi_info_read(CurlMultiHandle $multi_handle, &$msgs_in_queue = null): array|false {}
53+
/** @param int $queued_messages */
54+
function curl_multi_info_read(CurlMultiHandle $multi_handle, &$queued_messages = null): array|false {}
5555

5656
function curl_multi_init(): CurlMultiHandle {}
5757

5858
function curl_multi_remove_handle(CurlMultiHandle $multi_handle, CurlHandle $handle): int {}
5959

6060
function curl_multi_select(CurlMultiHandle $multi_handle, float $timeout = 1.0): int {}
6161

62-
function curl_multi_strerror(int $error_number): ?string {}
62+
function curl_multi_strerror(int $error_code): ?string {}
6363

6464
#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */
65-
function curl_pause(CurlHandle $handle, int $bitmask): int {}
65+
function curl_pause(CurlHandle $handle, int $flags): int {}
6666
#endif
6767

6868
function curl_reset(CurlHandle $handle): void {}
@@ -79,8 +79,8 @@ function curl_share_init(): CurlShareHandle {}
7979

8080
function curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool {}
8181

82-
function curl_share_strerror(int $error_number): ?string {}
82+
function curl_share_strerror(int $error_code): ?string {}
8383

84-
function curl_strerror(int $error_number): ?string {}
84+
function curl_strerror(int $error_code): ?string {}
8585

8686
function curl_version(): array|false {}

ext/curl/curl_arginfo.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: ca65615cacfe914f3511007fd393169ffededf34 */
2+
* Stub hash: afeae538b49eb43a661e5b491da79c17d10c6bfe */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0)
55
ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0)
@@ -42,8 +42,8 @@ ZEND_END_ARG_INFO()
4242

4343
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_curl_file_create, 0, 1, CURLFile, 0)
4444
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
45-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetype, IS_STRING, 1, "null")
46-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, postname, IS_STRING, 1, "null")
45+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mime_type, IS_STRING, 1, "null")
46+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, posted_filename, IS_STRING, 1, "null")
4747
ZEND_END_ARG_INFO()
4848

4949
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_getinfo, 0, 1, IS_MIXED, 0)
@@ -79,7 +79,7 @@ ZEND_END_ARG_INFO()
7979

8080
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_multi_info_read, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
8181
ZEND_ARG_OBJ_INFO(0, multi_handle, CurlMultiHandle, 0)
82-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, msgs_in_queue, "null")
82+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, queued_messages, "null")
8383
ZEND_END_ARG_INFO()
8484

8585
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_curl_multi_init, 0, 0, CurlMultiHandle, 0)
@@ -93,13 +93,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_select, 0, 1, IS_LONG
9393
ZEND_END_ARG_INFO()
9494

9595
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_strerror, 0, 1, IS_STRING, 1)
96-
ZEND_ARG_TYPE_INFO(0, error_number, IS_LONG, 0)
96+
ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0)
9797
ZEND_END_ARG_INFO()
9898

9999
#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */
100100
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_pause, 0, 2, IS_LONG, 0)
101101
ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0)
102-
ZEND_ARG_TYPE_INFO(0, bitmask, IS_LONG, 0)
102+
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
103103
ZEND_END_ARG_INFO()
104104
#endif
105105

ext/curl/curl_file.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class CURLFile
66
{
7-
public function __construct(string $filename, ?string $mimetype = null, ?string $postname = null) {}
7+
public function __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null) {}
88

99
/** @return string */
1010
public function getFilename() {}
@@ -16,8 +16,8 @@ public function getMimeType() {}
1616
public function getPostFilename() {}
1717

1818
/** @return void */
19-
public function setMimeType(string $mime) {}
19+
public function setMimeType(string $mime_type) {}
2020

2121
/** @return void */
22-
public function setPostFilename(string $postname) {}
22+
public function setPostFilename(string $posted_filename) {}
2323
}

ext/curl/curl_file_arginfo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 2dbca0eed1723e959b2a56d6035239b189f52495 */
2+
* Stub hash: a81720edab23748f6dce30306f5a5ffc9634da5d */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
6-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetype, IS_STRING, 1, "null")
7-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, postname, IS_STRING, 1, "null")
6+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mime_type, IS_STRING, 1, "null")
7+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, posted_filename, IS_STRING, 1, "null")
88
ZEND_END_ARG_INFO()
99

1010
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_getFilename, 0, 0, 0)
@@ -15,11 +15,11 @@ ZEND_END_ARG_INFO()
1515
#define arginfo_class_CURLFile_getPostFilename arginfo_class_CURLFile_getFilename
1616

1717
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setMimeType, 0, 0, 1)
18-
ZEND_ARG_TYPE_INFO(0, mime, IS_STRING, 0)
18+
ZEND_ARG_TYPE_INFO(0, mime_type, IS_STRING, 0)
1919
ZEND_END_ARG_INFO()
2020

2121
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setPostFilename, 0, 0, 1)
22-
ZEND_ARG_TYPE_INFO(0, postname, IS_STRING, 0)
22+
ZEND_ARG_TYPE_INFO(0, posted_filename, IS_STRING, 0)
2323
ZEND_END_ARG_INFO()
2424

2525

0 commit comments

Comments
 (0)