From eef994d6211ae96b108caccd77669336f4ec46e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 9 Oct 2020 23:02:14 +0200 Subject: [PATCH] Improve parameter names in ext/pdo_sqlite Closes GH-6310 --- ext/pdo_sqlite/sqlite_driver.stub.php | 4 ++-- ext/pdo_sqlite/sqlite_driver_arginfo.h | 14 +++++++------- .../tests/pdo_sqlite_createaggregate_002.phpt | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/pdo_sqlite/sqlite_driver.stub.php b/ext/pdo_sqlite/sqlite_driver.stub.php index eafd3c0c48..fc827cd381 100644 --- a/ext/pdo_sqlite/sqlite_driver.stub.php +++ b/ext/pdo_sqlite/sqlite_driver.stub.php @@ -5,10 +5,10 @@ // These are extension methods for PDO. This is not a real class. class PDO_SQLite_Ext { /** @return bool */ - public function sqliteCreateFunction(string $function_name, callable $callback, int $num_args = -1, int $flags = 0) {} + public function sqliteCreateFunction(string $name, callable $callback, int $numArgs = -1, int $flags = 0) {} /** @return bool */ - public function sqliteCreateAggregate(string $function_name, callable $step_func, callable $finalize_func, int $num_args = -1) {} + public function sqliteCreateAggregate(string $name, callable $step, callable $finalize, int $numArgs = -1) {} /** @return bool */ public function sqliteCreateCollation(string $name, callable $callback) {} diff --git a/ext/pdo_sqlite/sqlite_driver_arginfo.h b/ext/pdo_sqlite/sqlite_driver_arginfo.h index ad3df39bac..370f3d1315 100644 --- a/ext/pdo_sqlite/sqlite_driver_arginfo.h +++ b/ext/pdo_sqlite/sqlite_driver_arginfo.h @@ -1,18 +1,18 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e367675f85371fb06484e39dd6ccb3433766ffb8 */ + * Stub hash: 49737f1a08f0b1b66e326b7d06e316105202d27d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_SQLite_Ext_sqliteCreateFunction, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, function_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num_args, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, numArgs, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_SQLite_Ext_sqliteCreateAggregate, 0, 0, 3) - ZEND_ARG_TYPE_INFO(0, function_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, step_func, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, finalize_func, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num_args, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, step, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, finalize, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, numArgs, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_SQLite_Ext_sqliteCreateCollation, 0, 0, 2) diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt index 5660288af3..a906e8e52d 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt @@ -20,5 +20,5 @@ try { ?> --EXPECT-- -PDO::sqliteCreateAggregate(): Argument #2 ($step_func) must be a valid callback, function "a" not found or invalid function name -PDO::sqliteCreateAggregate(): Argument #3 ($finalize_func) must be a valid callback, function "" not found or invalid function name +PDO::sqliteCreateAggregate(): Argument #2 ($step) must be a valid callback, function "a" not found or invalid function name +PDO::sqliteCreateAggregate(): Argument #3 ($finalize) must be a valid callback, function "" not found or invalid function name -- 2.40.0