protected function getNewRepositoryUrl()
    {
        try {
            $this->getRemoteContents($this->getRepositoryUrl());
            $headers = $this->remoteFilesystem->getLastHeaders();

            if (!empty($headers[0]) && preg_match('{^HTTP/\S+ (30[1278])}i', $headers[0], $match)) {
                array_shift($headers);

                return $this->findNewLocationInHeader($headers);
            }

            return false;
        } catch (\Exception $ex) {
            return false;
        }
    }
protected function getNewRepositoryUrl()
    {
        try {
            $this->getRemoteContents($this->getRepositoryUrl());
            $headers = $this->remoteFilesystem->getLastHeaders();

            if (!empty($headers[0]) && preg_match('{^HTTP/\S+ (30[1278])}i', $headers[0], $match)) {
                array_shift($headers);

                return $this->findNewLocationInHeader($headers);
            }

            return false;
        } catch (\Exception $ex) {
            return false;
        }
    }
protected function getNewRepositoryUrl ( ) { try { $ this -> getRemoteContents ( $ this -> getRepositoryUrl ( ) ) ; $ headers = $ this -> remoteFilesystem -> getLastHeaders ( ) ; if ( ! empty ( $ headers [ 0 ] ) && preg_match ( '{^HTTP/\S+ (30[1278])}i' , $ headers [ 0 ] , $ match ) ) { array_shift ( $ headers ) ; return $ this -> findNewLocationInHeader ( $ headers ) ; } return false ; } catch ( \ Exception $ ex ) { return false ; } }
Get the new url of repository.

@return false|string The new url or false if there is not a new url
Get the new url of repository .