public static function addTrailingSlash($uri)
    {
        $uri = self::filterUri($uri);
        $path = $uri->getPath();
        if ('/' !== substr($path, -1)) {
            $path .= '/';
        }

        return self::normalizePath($uri, $path);
    }
public static function addTrailingSlash($uri)
    {
        $uri = self::filterUri($uri);
        $path = $uri->getPath();
        if ('/' !== substr($path, -1)) {
            $path .= '/';
        }

        return self::normalizePath($uri, $path);
    }
public static function addTrailingSlash ( $ uri ) { $ uri = self :: filterUri ( $ uri ) ; $ path = $ uri -> getPath ( ) ; if ( '/' !== substr ( $ path , - 1 ) ) { $ path .= '/' ; } return self :: normalizePath ( $ uri , $ path ) ; }
Add a trailing slash to the URI path.

@return Psr7UriInterface|UriInterface
Add a trailing slash to the URI path .