protected function setFragment($fragment)
    {
        $this->uriString = null;

        $fragment = ltrim($fragment, '#');

        $this->fragment = static::encode($fragment);

        return $this;
    }