protected function getTitle()
    {
        if (null !== $this->title) {
            return $this->title;
        }

        if (null === $this->title
            && $this->type == 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html'
            && array_key_exists($this->getStatus(), $this->problemStatusTitles)
        ) {
            return $this->problemStatusTitles[$this->status];
        }

        if ($this->detail instanceof \Throwable) {
            return get_class($this->detail);
        }

        if (null === $this->title) {
            return 'Unknown';
        }

        return $this->title;
    }