phpredis-phpdoc icon indicating copy to clipboard operation
phpredis-phpdoc copied to clipboard

keys method return type

Open moefar opened this issue 6 years ago • 2 comments

Hey guys

I have a situation when I want to get keys with a pattern using keys() method. I believe this method sometimes returns another type rather array.

moefar avatar May 30 '19 13:05 moefar

Hello, may be method return bool? For example false, if connection is not stable?

ukko avatar Jul 28 '19 21:07 ukko

Yeah, we are also facing this problem. We are getting boolean values

    public function getNames(string $pattern = '*'): array
    {
        return $this->redis->keys($pattern);
    }

fails with type violation - boolean given instead of array

scaytrase avatar Jan 28 '20 08:01 scaytrase