public function remoteRefExists($url, $ref = null, $heads = true)
    {
        $args = ['ls-remote', $url];
        if ($heads) {
            $args[] = '--heads';
        }
        if ($ref !== null) {
            $args[] = $ref;
        }
        $result = $this->execute($args, false, true);

        return !is_bool($result) && strlen($result) > 0;
    }
public function remoteRefExists($url, $ref = null, $heads = true)
    {
        $args = ['ls-remote', $url];
        if ($heads) {
            $args[] = '--heads';
        }
        if ($ref !== null) {
            $args[] = $ref;
        }
        $result = $this->execute($args, false, true);

        return !is_bool($result) && strlen($result) > 0;
    }
public function remoteRefExists ( $ url , $ ref = null , $ heads = true ) { $ args = [ 'ls-remote' , $ url ] ; if ( $ heads ) { $ args [ ] = '--heads' ; } if ( $ ref !== null ) { $ args [ ] = $ ref ; } $ result = $ this -> execute ( $ args , false , true ) ; return ! is_bool ( $ result ) && strlen ( $ result ) > 0 ; }
Check whether a remote repository exists.

@param string $url
@param string $ref
@param bool   $heads Whether to limit to heads only.

@throws \Symfony\Component\Process\Exception\RuntimeException
If the Git command fails.

@return bool
Check whether a remote repository exists .