public static function fromString($httpVersion): self
    {
        if (empty($httpVersion)) {
            throw new \InvalidArgumentException('Given HTTP version is empty');
        }

        $major = null;
        $minor = null;
        if (2 != sscanf($httpVersion, 'HTTP/%d.%d', $major, $minor)) {
            throw new \InvalidArgumentException(
                    'Given HTTP version "' . $httpVersion . '" can not be parsed'
            );
        }

        return new self($major, $minor);
    }