0 follower

Final Class Yiisoft\YiiDevTool\App\Component\Git\GitBranches

InheritanceYiisoft\YiiDevTool\App\Component\Git\GitBranches
ImplementsIteratorAggregate

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\YiiDevTool\App\Component\Git\GitWorkingCopy $gitWorkingCopy )
$gitWorkingCopy Yiisoft\YiiDevTool\App\Component\Git\GitWorkingCopy

                public function __construct(private GitWorkingCopy $gitWorkingCopy)
{
}

            
all() public method

public string[] all ( )

                public function all(): array
{
    return $this->fetchBranches();
}

            
getIterator() public method

public \ArrayIterator getIterator ( )

                public function getIterator(): ArrayIterator
{
    return new ArrayIterator($this->all());
}

            
head() public method

public string head ( )

                public function head(): string
{
    return trim($this->gitWorkingCopy->run('rev-parse', ['--abbrev-ref', 'HEAD']));
}