From 46e183611de66760cc2a64a58d38456546b1a2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Thu, 2 Dec 2021 07:44:24 +0100 Subject: [PATCH] Fix RedisCluster::setOption|getOption types See https://github.com/phpredis/phpredis/issues/2038 and https://github.com/vimeo/psalm/pull/7030 --- redis/RedisCluster.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 8cb17a83f1..d3472e99f3 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -2817,20 +2817,20 @@ public function clearLastError() {} /** * Get client option * - * @param string $name parameter name + * @param string $option parameter name * - * @return int Parameter value. + * @return int|string Parameter value. * @example * // return RedisCluster::SERIALIZER_NONE, RedisCluster::SERIALIZER_PHP, or RedisCluster::SERIALIZER_IGBINARY. * $redisCluster->getOption(RedisCluster::OPT_SERIALIZER); */ - public function getOption($name) {} + public function getOption($option) {} /** * Set client option. * - * @param string $name parameter name - * @param string $value parameter value + * @param int $option parameter name + * @param int|string $value parameter value * * @return bool TRUE on success, FALSE on error. * @example @@ -2841,7 +2841,7 @@ public function getOption($name) {} * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'myAppName:'); // use custom prefix on all keys * */ - public function setOption($name, $value) {} + public function setOption($option, $value) {} /** * A utility method to prefix the value with the prefix setting for phpredis.