public static function removeLeadingSlash($uri)
    {
        $uri = self::filterUri($uri);
        $path = $uri->getPath();
        if ('' !== $path && '/' === $path[0]) {
            $path = substr($path, 1);
        }

        return self::normalizePath($uri, $path);
    }
public static function removeLeadingSlash($uri)
    {
        $uri = self::filterUri($uri);
        $path = $uri->getPath();
        if ('' !== $path && '/' === $path[0]) {
            $path = substr($path, 1);
        }

        return self::normalizePath($uri, $path);
    }
public static function removeLeadingSlash ( $ uri ) { $ uri = self :: filterUri ( $ uri ) ; $ path = $ uri -> getPath ( ) ; if ( '' !== $ path && '/' === $ path [ 0 ] ) { $ path = substr ( $ path , 1 ) ; } return self :: normalizePath ( $ uri , $ path ) ; }
Remove the leading slash from the URI path.

@return Psr7UriInterface|UriInterface
Remove the leading slash from the URI path .