private function removeTrailingSlash($url)
    {
        // if there is a final slash, we take the URL without this slash (expected URL format)
        if (strlen($url) > 5
            && $url[strlen($url) - 1] == '/'
        ) {
            $url = substr($url, 0, strlen($url) - 1);
        }

        return $url;
    }
private function removeTrailingSlash($url)
    {
        // if there is a final slash, we take the URL without this slash (expected URL format)
        if (strlen($url) > 5
            && $url[strlen($url) - 1] == '/'
        ) {
            $url = substr($url, 0, strlen($url) - 1);
        }

        return $url;
    }
private function removeTrailingSlash ( $ url ) { // if there is a final slash, we take the URL without this slash (expected URL format) if ( strlen ( $ url ) > 5 && $ url [ strlen ( $ url ) - 1 ] == '/' ) { $ url = substr ( $ url , 0 , strlen ( $ url ) - 1 ) ; } return $ url ; }
Remove the final slash in the URLs if found

@param string $url
@return string the URL without the trailing slash
Remove the final slash in the URLs if found