Bart\Git\Commit::__construct PHP Method

__construct() public method

public __construct ( Bart\Git\GitRoot $root, string $revision, string $projectName = null )
$root Bart\Git\GitRoot Root of repo on disk
$revision string The revision label of commit, typically the hash.
$projectName string Project in which commit was made. This defaults to `null` for backwards compatibility See `man git-rev-parse` "SPECIFYING REVISIONS" for valid names
    public function __construct(GitRoot $root, $revision, $projectName = null)
    {
        // Consider switching from composition of gitRoot to inheritance
        $this->gitRoot = $root;
        $this->revision = $revision;
        $this->projectName = $projectName;
    }