]> granicus.if.org Git - php/commitdiff
Review parameter names in ext/sysvmsg
authorMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 1 Oct 2020 07:53:57 +0000 (09:53 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 1 Oct 2020 21:08:20 +0000 (23:08 +0200)
Closes GH-6247

ext/sysvmsg/sysvmsg.stub.php
ext/sysvmsg/sysvmsg_arginfo.h
ext/sysvmsg/tests/005.phpt

index cb5174027b3b070478dc4f61eb6e5281c5ada514..2a0c9cdc954368f67f77f2b4edd8e855244be1e1 100644 (file)
@@ -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 {}
 
index 2eadbed14420eb75b48ce86b40084064bd864524..804f1768b300d7f981175d475debb9df146fc83b 100644 (file)
@@ -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)
index 51713e2fab1868810e85f29a8e3192ca20242620..ac3592a528b8253904f75b8713f0eae5b4c1ed33 100644 (file)
@@ -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)