src/Command/SelfUpdateCommand.php
protected function determineRemoteFilename($updateVersion)
    {
        // If sha, download from root.
        if (preg_match('{^[0-9a-f]{40}$}', $updateVersion)) {
            return $this->getBaseUrl() . '/' . $this->getPharName();
        }

        // Download from sub directory otherwise.
        return sprintf(
            '%s/download/%s/%s',
            $this->getBaseUrl(),
            $updateVersion,
            $this->getPharName()
        );
    }
protected function determineRemoteFilename($updateVersion)
    {
        // If sha, download from root.
        if (preg_match('{^[0-9a-f]{40}$}', $updateVersion)) {
            return $this->getBaseUrl() . '/' . $this->getPharName();
        }

        // Download from sub directory otherwise.
        return sprintf(
            '%s/download/%s/%s',
            $this->getBaseUrl(),
            $updateVersion,
            $this->getPharName()
        );
    }
protected function determineRemoteFilename ( $ updateVersion ) { // If sha, download from root. if ( preg_match ( '{^[0-9a-f]{40}$}' , $ updateVersion ) ) { return $ this -> getBaseUrl ( ) . '/' . $ this -> getPharName ( ) ; } // Download from sub directory otherwise. return sprintf ( '%s/download/%s/%s' , $ this -> getBaseUrl ( ) , $ updateVersion , $ this -> getPharName ( ) ) ; }
Calculate the remote filename from a version.

@param string $updateVersion The version to update to either an sha or a semver version.

@return string
Calculate the remote filename from a version .