]> granicus.if.org Git - php/commitdiff
Review parameter names in ext/readline
authorMáté Kocsis <kocsismate@woohoolabs.com>
Tue, 29 Sep 2020 20:32:23 +0000 (22:32 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 30 Sep 2020 08:10:28 +0000 (10:10 +0200)
Closes GH-6240

ext/readline/readline.stub.php
ext/readline/readline_arginfo.h
ext/readline/tests/readline_completion_function_001.phpt

index ecd81416eba809a18c01562082934f3204cc72ae..cfc1d0d8d5970353fe59ee51341257a13e6903e6 100644 (file)
@@ -5,10 +5,10 @@
 function readline(?string $prompt = null): string|false {}
 
 /**
- * @param int|string|bool|null $newvalue
+ * @param int|string|bool|null $value
  * @return array|int|string|bool|null
  */
-function readline_info(?string $varname = null, $newvalue = null): mixed {}
+function readline_info(?string $var_name = null, $value = null): mixed {}
 
 function readline_add_history(string $prompt): bool {}
 
@@ -22,7 +22,7 @@ function readline_read_history(?string $filename = null): bool {}
 
 function readline_write_history(?string $filename = null): bool {}
 
-function readline_completion_function(callable $funcname): bool {}
+function readline_completion_function(callable $callback): bool {}
 
 
 #if HAVE_RL_CALLBACK_READ_CHAR
index a83773b786cdf76354554612fd7ad5454654075b..0b432d1e4ee35f7821a3f1f8325c847753c8ab9a 100644 (file)
@@ -1,13 +1,13 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: c7d13f6960171cab30984837379db25b32f38c36 */
+ * Stub hash: 226b138a99e3e32aea90cbb5c44446ac7c16db71 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_info, 0, 0, IS_MIXED, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, varname, IS_STRING, 1, "null")
-       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, newvalue, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, var_name, IS_STRING, 1, "null")
+       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null")
 ZEND_END_ARG_INFO()
 
 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()
 #define arginfo_readline_write_history arginfo_readline_read_history
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_completion_function, 0, 1, _IS_BOOL, 0)
-       ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0)
+       ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
 ZEND_END_ARG_INFO()
 
 #if HAVE_RL_CALLBACK_READ_CHAR
index 2556027bff37e42da9d9eb5c8da83c04c1b8db87..98fae6bbc0755a882fd271d4dbb7c4991115ae30 100644 (file)
@@ -26,5 +26,5 @@ foreach ($data as $callback) {
 --EXPECT--
 bool(true)
 bool(true)
-readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given
-readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given
+readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given
+readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given