private function collapseStartingSlashes($path_string, Authority $authority = null)
    {
        $path_string = new StringHelper($path_string);

        if (empty((string) $authority)) {
            $path_string = $path_string->collapseStartingRepetition("/");
        }

        return (string) $path_string;
    }