src/GitWorkingCopy.php
public function getRemoteUrl(string $remote, string $operation = 'fetch'): string
    {
        $argsAndOptions = ['get-url', $remote];

        if ($operation === 'push') {
            $argsAndOptions[] = '--push';
        }

        return rtrim($this->remote(...$argsAndOptions));
    }
public function getRemoteUrl(string $remote, string $operation = 'fetch'): string
    {
        $argsAndOptions = ['get-url', $remote];

        if ($operation === 'push') {
            $argsAndOptions[] = '--push';
        }

        return rtrim($this->remote(...$argsAndOptions));
    }
public function getRemoteUrl ( string $ remote , string $ operation = 'fetch' ) : string { $ argsAndOptions = [ 'get-url' , $ remote ] ; if ( $ operation === 'push' ) { $ argsAndOptions [ ] = '--push' ; } return rtrim ( $ this -> remote ( ... $ argsAndOptions ) ) ; }
Returns the fetch or push URL of a given remote.

@param string $operation The operation for which to return the remote. Can be either 'fetch' or 'push'.
Returns the fetch or push URL of a given remote .