public function getArrayValue(array $values)
    {
        if (empty($values)) {
            throw new InvalidArgumentException('Empty parameter');
        }

        // reindex array
        $values = \array_values($values);

        return $values[$this->generator->getInt(0, count($values) - 1)];
    }
public function getArrayValue(array $values)
    {
        if (empty($values)) {
            throw new InvalidArgumentException('Empty parameter');
        }

        // reindex array
        $values = \array_values($values);

        return $values[$this->generator->getInt(0, count($values) - 1)];
    }
Returns an array value with equal probabilities.
The input array must not be empty.

@param array $values Array of values to be returned.

@return mixed One of the values of the input array.