PHP Class Gush\Helper\GitConfigHelper

Inheritance: extends Symfony\Component\Console\Helper\Helper
Show file Open project: gushphp/gush Class Usage Examples

Public Methods

Method Description
__construct ( ProcessHelper $processHelper, Application $application )
ensureNotesFetching ( string $remote ) Ensures the fetching of notes is configured for the remote.
ensureRemoteExists ( string $org, string $repo ) Ensure the remote exist for the org and repo.
getGitConfig ( string $config, string $section = 'local', $all = false ) : string
getName ( )
getRemoteInfo ( string $name ) : array
hasGitConfig ( string $config, string $section = 'local', null $expectedValue = null ) : boolean
remoteExists ( $name, $expectedUrl = null )
setGitConfig ( string $config, string $value, boolean $overwrite = false, string $section = 'local' )
setRemote ( string $name, string $url, string $pushUrl = null )

Method Details

__construct() public method

public __construct ( ProcessHelper $processHelper, Application $application )
$processHelper ProcessHelper
$application Gush\Application

ensureNotesFetching() public method

Ensures the fetching of notes is configured for the remote.
public ensureNotesFetching ( string $remote )
$remote string

ensureRemoteExists() public method

Ensure the remote exist for the org and repo.
public ensureRemoteExists ( string $org, string $repo )
$org string
$repo string

getGitConfig() public method

public getGitConfig ( string $config, string $section = 'local', $all = false ) : string
$config string
$section string
return string

getName() public method

public getName ( )

getRemoteInfo() public method

public getRemoteInfo ( string $name ) : array
$name string
return array [host, vendor, repo]

hasGitConfig() public method

public hasGitConfig ( string $config, string $section = 'local', null $expectedValue = null ) : boolean
$config string
$section string
$expectedValue null
return boolean

remoteExists() public method

public remoteExists ( $name, $expectedUrl = null )

setGitConfig() public method

public setGitConfig ( string $config, string $value, boolean $overwrite = false, string $section = 'local' )
$config string
$value string
$overwrite boolean
$section string

setRemote() public method

public setRemote ( string $name, string $url, string $pushUrl = null )
$name string
$url string
$pushUrl string Optional push-url