src/BTR/RedisObjects/RedisSet.php
public function unionStore($destination, $set, ...$sets): int
    {
        array_unshift($sets, $set);
        array_unshift($sets, $this);
        $keys = [];
        foreach ($sets as $key) {
            $keys[] = ($key instanceof self) ? $key->key : $key;
        }
        if ($destination instanceof self) {
            $destination = $destination->key;
        }

        return $this->redis->sunionstore($destination, $keys);
    }
public function unionStore($destination, $set, ...$sets): int
    {
        array_unshift($sets, $set);
        array_unshift($sets, $this);
        $keys = [];
        foreach ($sets as $key) {
            $keys[] = ($key instanceof self) ? $key->key : $key;
        }
        if ($destination instanceof self) {
            $destination = $destination->key;
        }

        return $this->redis->sunionstore($destination, $keys);
    }
@param string|self $destination Key or RedisSet that will hold the resulting set.
@param string|self $set         First set or key.
@param array<int, string|self> $sets,...     More sets or keys. Can be mixed.

@return int The number of elements in the resulting set.