From: Máté Kocsis Date: Thu, 1 Oct 2020 07:53:57 +0000 (+0200) Subject: Review parameter names in ext/sysvmsg X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ceef8ad4904a26af8221ddadc174618287b62a3a;p=php Review parameter names in ext/sysvmsg Closes GH-6247 --- diff --git a/ext/sysvmsg/sysvmsg.stub.php b/ext/sysvmsg/sysvmsg.stub.php index cb5174027b..2a0c9cdc95 100644 --- a/ext/sysvmsg/sysvmsg.stub.php +++ b/ext/sysvmsg/sysvmsg.stub.php @@ -6,19 +6,28 @@ final class SysvMessageQueue { } -function msg_get_queue(int $key, int $perms = 0666): SysvMessageQueue|false {} +function msg_get_queue(int $key, int $permissions = 0666): SysvMessageQueue|false {} /** * @param string|int|float|bool $message - * @param int $errorcode + * @param int $error_code */ -function msg_send(SysvMessageQueue $queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, &$errorcode = null): bool {} +function msg_send(SysvMessageQueue $queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, &$error_code = null): bool {} /** - * @param int $msgtype - * @param int $errorcode + * @param int $received_message_type + * @param int $error_code */ -function msg_receive(SysvMessageQueue $queue, int $desiredmsgtype, &$msgtype, int $maxsize, mixed &$message, bool $unserialize = true, int $flags = 0, &$errorcode = null): bool {} +function msg_receive( + SysvMessageQueue $queue, + int $desired_message_type, + &$received_message_type, + int $max_message_size, + mixed &$message, + bool $unserialize = true, + int $flags = 0, + &$error_code = null +): bool {} function msg_remove_queue(SysvMessageQueue $queue): bool {} diff --git a/ext/sysvmsg/sysvmsg_arginfo.h b/ext/sysvmsg/sysvmsg_arginfo.h index 2eadbed144..804f1768b3 100644 --- a/ext/sysvmsg/sysvmsg_arginfo.h +++ b/ext/sysvmsg/sysvmsg_arginfo.h @@ -1,29 +1,29 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 40f03edb33ac213c9f436d5e7ea85ec2750fdf6e */ + * Stub hash: 3f918caddccfebee1f1048abd4a23672724436ad */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_msg_get_queue, 0, 1, SysvMessageQueue, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perms, IS_LONG, 0, "0666") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, permissions, IS_LONG, 0, "0666") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_send, 0, 3, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, queue, SysvMessageQueue, 0) - ZEND_ARG_TYPE_INFO(0, msgtype, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, message_type, IS_LONG, 0) ZEND_ARG_INFO(0, message) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, serialize, _IS_BOOL, 0, "true") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, blocking, _IS_BOOL, 0, "true") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_receive, 0, 5, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, queue, SysvMessageQueue, 0) - ZEND_ARG_TYPE_INFO(0, desiredmsgtype, IS_LONG, 0) - ZEND_ARG_INFO(1, msgtype) - ZEND_ARG_TYPE_INFO(0, maxsize, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, desired_message_type, IS_LONG, 0) + ZEND_ARG_INFO(1, received_message_type) + ZEND_ARG_TYPE_INFO(0, max_message_size, IS_LONG, 0) ZEND_ARG_TYPE_INFO(1, message, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserialize, _IS_BOOL, 0, "true") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_remove_queue, 0, 1, _IS_BOOL, 0) diff --git a/ext/sysvmsg/tests/005.phpt b/ext/sysvmsg/tests/005.phpt index 51713e2fab..ac3592a528 100644 --- a/ext/sysvmsg/tests/005.phpt +++ b/ext/sysvmsg/tests/005.phpt @@ -46,7 +46,7 @@ bool(false) bool(false) bool(false) bool(true) -msg_receive(): Argument #4 ($maxsize) must be greater than 0 +msg_receive(): Argument #4 ($max_message_size) must be greater than 0 Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d bool(false) @@ -56,7 +56,7 @@ bool(false) bool(false) bool(false) bool(true) -msg_receive(): Argument #4 ($maxsize) must be greater than 0 +msg_receive(): Argument #4 ($max_message_size) must be greater than 0 Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d bool(false)