Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f8ff72

Browse files
authored
Update zCount argument type in redis.stub.php (#2439)
* Update zCount argument type in redis.stub.php zCount's min/max can also be an integer. * fix arginfo
1 parent 5d29324 commit 8f8ff72

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

redis.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4026,8 +4026,8 @@ public function zCard(string $key): Redis|int|false;
40264026
* Count the number of members in a sorted set with scores inside a provided range.
40274027
*
40284028
* @param string $key The sorted set to check.
4029-
* @param string $min The minimum score to include in the count
4030-
* @param string $max The maximum score to include in the count
4029+
* @param int|string $min The minimum score to include in the count
4030+
* @param int|string $max The maximum score to include in the count
40314031
*
40324032
* NOTE: In addition to a floating point score you may pass the special values of '-inf' and
40334033
* '+inf' meaning negative and positive infinity, respectively.
@@ -4038,7 +4038,7 @@ public function zCard(string $key): Redis|int|false;
40384038
* @example $redis->zCount('fruit-rankings', 50, 60);
40394039
* @example $redis->zCount('fruit-rankings', '-inf', 0);
40404040
*/
4041-
public function zCount(string $key, string $start, string $end): Redis|int|false;
4041+
public function zCount(string $key, int|string $start, int|string $end): Redis|int|false;
40424042

40434043
/**
40444044
* Create or increment the score of a member in a Redis sorted set

redis_arginfo.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6afb67851068637b92e885e8a16ca6818061ed6e */
2+
* Stub hash: 3b2ecc525884fc1ae2a71b8e053fa245b108c4bb */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null")
@@ -1002,8 +1002,8 @@ ZEND_END_ARG_INFO()
10021002

10031003
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_zCount, 0, 3, Redis, MAY_BE_LONG|MAY_BE_FALSE)
10041004
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
1005-
ZEND_ARG_TYPE_INFO(0, start, IS_STRING, 0)
1006-
ZEND_ARG_TYPE_INFO(0, end, IS_STRING, 0)
1005+
ZEND_ARG_TYPE_MASK(0, start, MAY_BE_LONG|MAY_BE_STRING, NULL)
1006+
ZEND_ARG_TYPE_MASK(0, end, MAY_BE_LONG|MAY_BE_STRING, NULL)
10071007
ZEND_END_ARG_INFO()
10081008

10091009
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_zIncrBy, 0, 3, Redis, MAY_BE_DOUBLE|MAY_BE_FALSE)
@@ -1082,7 +1082,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_zRemRangeByRank,
10821082
ZEND_ARG_TYPE_INFO(0, end, IS_LONG, 0)
10831083
ZEND_END_ARG_INFO()
10841084

1085-
#define arginfo_class_Redis_zRemRangeByScore arginfo_class_Redis_zCount
1085+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_zRemRangeByScore, 0, 3, Redis, MAY_BE_LONG|MAY_BE_FALSE)
1086+
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
1087+
ZEND_ARG_TYPE_INFO(0, start, IS_STRING, 0)
1088+
ZEND_ARG_TYPE_INFO(0, end, IS_STRING, 0)
1089+
ZEND_END_ARG_INFO()
10861090

10871091
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_zRevRange, 0, 3, Redis, MAY_BE_ARRAY|MAY_BE_FALSE)
10881092
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)

0 commit comments

Comments
 (0)