src/Viserio/Component/Http/AbstractMessage.php
private function validateProtocolVersion(string $version): void
    {
        if ($version === '') {
            throw new InvalidArgumentException('HTTP protocol version can not be empty.');
        }

        if (! isset(self::$validProtocolVersions[$version])) {
            throw new InvalidArgumentException(
                \sprintf('Invalid HTTP version. Must be one of: [%s].', \implode(', ', \array_keys(self::$validProtocolVersions)))
            );
        }
    }
private function validateProtocolVersion(string $version): void
    {
        if ($version === '') {
            throw new InvalidArgumentException('HTTP protocol version can not be empty.');
        }

        if (! isset(self::$validProtocolVersions[$version])) {
            throw new InvalidArgumentException(
                \sprintf('Invalid HTTP version. Must be one of: [%s].', \implode(', ', \array_keys(self::$validProtocolVersions)))
            );
        }
    }
Validate the HTTP protocol version.

@param string $version

@throws \Viserio\Component\Contract\Http\Exception\InvalidArgumentException on invalid HTTP protocol version

@return void