Skip to content

Commit 26af806

Browse files
committed
Review parameter names in ext/readline
Closes GH-6240
1 parent fe64d73 commit 26af806

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ext/readline/readline.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
function readline(?string $prompt = null): string|false {}
66

77
/**
8-
* @param int|string|bool|null $newvalue
8+
* @param int|string|bool|null $value
99
* @return array|int|string|bool|null
1010
*/
11-
function readline_info(?string $varname = null, $newvalue = null): mixed {}
11+
function readline_info(?string $var_name = null, $value = null): mixed {}
1212

1313
function readline_add_history(string $prompt): bool {}
1414

@@ -22,7 +22,7 @@ function readline_read_history(?string $filename = null): bool {}
2222

2323
function readline_write_history(?string $filename = null): bool {}
2424

25-
function readline_completion_function(callable $funcname): bool {}
25+
function readline_completion_function(callable $callback): bool {}
2626

2727

2828
#if HAVE_RL_CALLBACK_READ_CHAR

ext/readline/readline_arginfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: c7d13f6960171cab30984837379db25b32f38c36 */
2+
* Stub hash: 226b138a99e3e32aea90cbb5c44446ac7c16db71 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null")
66
ZEND_END_ARG_INFO()
77

88
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_info, 0, 0, IS_MIXED, 0)
9-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, varname, IS_STRING, 1, "null")
10-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, newvalue, "null")
9+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, var_name, IS_STRING, 1, "null")
10+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null")
1111
ZEND_END_ARG_INFO()
1212

1313
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_add_history, 0, 1, _IS_BOOL, 0)
@@ -29,7 +29,7 @@ ZEND_END_ARG_INFO()
2929
#define arginfo_readline_write_history arginfo_readline_read_history
3030

3131
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_completion_function, 0, 1, _IS_BOOL, 0)
32-
ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0)
32+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
3333
ZEND_END_ARG_INFO()
3434

3535
#if HAVE_RL_CALLBACK_READ_CHAR

ext/readline/tests/readline_completion_function_001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ foreach ($data as $callback) {
2626
--EXPECT--
2727
bool(true)
2828
bool(true)
29-
readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given
30-
readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given
29+
readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given
30+
readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given

0 commit comments

Comments
 (0)