diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-11-08 23:29:12 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-11-11 14:54:55 +0100 |
commit | 27e83d0fb87c04b61441fb77e963dd4e14ad187e (patch) | |
tree | 1b35b21c48c54f353e643d29dd2306d8e1ba084a /ext/shmop | |
parent | 2804ea612779b89d3c62d974eb35783dd31f7dee (diff) | |
download | php-git-27e83d0fb87c04b61441fb77e963dd4e14ad187e.tar.gz |
Add union return types for function stubs
Diffstat (limited to 'ext/shmop')
-rw-r--r-- | ext/shmop/shmop.stub.php | 26 | ||||
-rw-r--r-- | ext/shmop/shmop_arginfo.h | 4 |
2 files changed, 9 insertions, 21 deletions
diff --git a/ext/shmop/shmop.stub.php b/ext/shmop/shmop.stub.php index 11a65fc728..8ee2eeba9d 100644 --- a/ext/shmop/shmop.stub.php +++ b/ext/shmop/shmop.stub.php @@ -3,29 +3,17 @@ /** @return resource|false */ function shmop_open(int $key, string $flags, int $mode, int $size) {} -/** - * @param resource $shmid - * @return string|false - */ -function shmop_read($shmid, int $start, int $count) {} +/** @param resource $shmid */ +function shmop_read($shmid, int $start, int $count): string|false {} -/** - * @param resource $shmid - */ +/** @param resource $shmid */ function shmop_close($shmid): void {} -/** - * @param resource $shmid - */ +/** @param resource $shmid */ function shmop_size($shmid): int {} -/** - * @param resource $shmid - * @return int|false - */ -function shmop_write($shmid, string $data, int $offset) {} +/** @param resource $shmid */ +function shmop_write($shmid, string $data, int $offset): int|false {} -/** - * @param resource $shmid - */ +/** @param resource $shmid */ function shmop_delete($shmid): bool {} diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h index c91b4ace12..49afa595db 100644 --- a/ext/shmop/shmop_arginfo.h +++ b/ext/shmop/shmop_arginfo.h @@ -7,7 +7,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_open, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_read, 0, 0, 3) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_shmop_read, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, shmid) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) @@ -21,7 +21,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_size, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(0, shmid) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_write, 0, 0, 3) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_shmop_write, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, shmid) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) |