Skip to content

Commit ceef8ad

Browse files
committed
Review parameter names in ext/sysvmsg
Closes GH-6247
1 parent 29dd124 commit ceef8ad

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

ext/sysvmsg/sysvmsg.stub.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,28 @@ final class SysvMessageQueue
66
{
77
}
88

9-
function msg_get_queue(int $key, int $perms = 0666): SysvMessageQueue|false {}
9+
function msg_get_queue(int $key, int $permissions = 0666): SysvMessageQueue|false {}
1010

1111
/**
1212
* @param string|int|float|bool $message
13-
* @param int $errorcode
13+
* @param int $error_code
1414
*/
15-
function msg_send(SysvMessageQueue $queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, &$errorcode = null): bool {}
15+
function msg_send(SysvMessageQueue $queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, &$error_code = null): bool {}
1616

1717
/**
18-
* @param int $msgtype
19-
* @param int $errorcode
18+
* @param int $received_message_type
19+
* @param int $error_code
2020
*/
21-
function msg_receive(SysvMessageQueue $queue, int $desiredmsgtype, &$msgtype, int $maxsize, mixed &$message, bool $unserialize = true, int $flags = 0, &$errorcode = null): bool {}
21+
function msg_receive(
22+
SysvMessageQueue $queue,
23+
int $desired_message_type,
24+
&$received_message_type,
25+
int $max_message_size,
26+
mixed &$message,
27+
bool $unserialize = true,
28+
int $flags = 0,
29+
&$error_code = null
30+
): bool {}
2231

2332
function msg_remove_queue(SysvMessageQueue $queue): bool {}
2433

ext/sysvmsg/sysvmsg_arginfo.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 40f03edb33ac213c9f436d5e7ea85ec2750fdf6e */
2+
* Stub hash: 3f918caddccfebee1f1048abd4a23672724436ad */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_msg_get_queue, 0, 1, SysvMessageQueue, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
6-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perms, IS_LONG, 0, "0666")
6+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, permissions, IS_LONG, 0, "0666")
77
ZEND_END_ARG_INFO()
88

99
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_send, 0, 3, _IS_BOOL, 0)
1010
ZEND_ARG_OBJ_INFO(0, queue, SysvMessageQueue, 0)
11-
ZEND_ARG_TYPE_INFO(0, msgtype, IS_LONG, 0)
11+
ZEND_ARG_TYPE_INFO(0, message_type, IS_LONG, 0)
1212
ZEND_ARG_INFO(0, message)
1313
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, serialize, _IS_BOOL, 0, "true")
1414
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, blocking, _IS_BOOL, 0, "true")
15-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null")
15+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null")
1616
ZEND_END_ARG_INFO()
1717

1818
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_receive, 0, 5, _IS_BOOL, 0)
1919
ZEND_ARG_OBJ_INFO(0, queue, SysvMessageQueue, 0)
20-
ZEND_ARG_TYPE_INFO(0, desiredmsgtype, IS_LONG, 0)
21-
ZEND_ARG_INFO(1, msgtype)
22-
ZEND_ARG_TYPE_INFO(0, maxsize, IS_LONG, 0)
20+
ZEND_ARG_TYPE_INFO(0, desired_message_type, IS_LONG, 0)
21+
ZEND_ARG_INFO(1, received_message_type)
22+
ZEND_ARG_TYPE_INFO(0, max_message_size, IS_LONG, 0)
2323
ZEND_ARG_TYPE_INFO(1, message, IS_MIXED, 0)
2424
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserialize, _IS_BOOL, 0, "true")
2525
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
26-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null")
26+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null")
2727
ZEND_END_ARG_INFO()
2828

2929
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_remove_queue, 0, 1, _IS_BOOL, 0)

ext/sysvmsg/tests/005.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bool(false)
4646
bool(false)
4747
bool(false)
4848
bool(true)
49-
msg_receive(): Argument #4 ($maxsize) must be greater than 0
49+
msg_receive(): Argument #4 ($max_message_size) must be greater than 0
5050

5151
Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d
5252
bool(false)
@@ -56,7 +56,7 @@ bool(false)
5656
bool(false)
5757
bool(false)
5858
bool(true)
59-
msg_receive(): Argument #4 ($maxsize) must be greater than 0
59+
msg_receive(): Argument #4 ($max_message_size) must be greater than 0
6060

6161
Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d
6262
bool(false)

0 commit comments

Comments
 (0)