public function getRandomValues($number)
    {
        $values = [];

        $keys = $number > 1 ? $this->getRandomKeys($number) : [$this->getRandomKeys($number)];
        foreach ($keys as $key) {
            $values[] = $this->offsetGet($key);
        }

        return $values;
    }
public function getRandomValues($number)
    {
        $values = [];

        $keys = $number > 1 ? $this->getRandomKeys($number) : [$this->getRandomKeys($number)];
        foreach ($keys as $key) {
            $values[] = $this->offsetGet($key);
        }

        return $values;
    }
public function getRandomValues ( $ number ) { $ values = [ ] ; $ keys = $ number > 1 ? $ this -> getRandomKeys ( $ number ) : [ $ this -> getRandomKeys ( $ number ) ] ; foreach ( $ keys as $ key ) { $ values [ ] = $ this -> offsetGet ( $ key ) ; } return $ values ; }
Pick a given number of random values with non-duplicate indexes out of the array.

@param int $number The number of values (should be > 1 and < $this->count())

@return array Random values of array

@throws \RangeException
Pick a given number of random values with non - duplicate indexes out of the array .