private function parseStatusLine(string $statusLine)
    {
        $matches = [];
        if (preg_match("=^(HTTP/\d+\.\d+) (\d{3}) ([^\r]*)=", $statusLine, $matches) == false) {
            throw new ProtocolViolation(
                    'Received status line "' . addcslashes($statusLine, "\0..\37!\177..\377")
                    . '" does not match expected format "=^(HTTP/\d+\.\d+) (\d{3}) ([^\r]*)="'
            );
        }

        $this->statusLine   = $matches[0];
        $this->version      = HttpVersion::fromString($matches[1]);
        $this->statusCode   = (int) $matches[2];
        $this->reasonPhrase = $matches[3];
    }