public static function inArray($value, array $array, $message = null)
    {
        if (!in_array($value, $array)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Value %s is not in array',
                Helper::valueToString($value)
            ));
        }
    }