Commit Class

class Commit

Represents a Commit

__construct(string $id = '', string $tag = '', CommitType $type = CommitType::normal)

Creates a new Commit of the active branch

Parameters:
  • $label (string) – The Commit description

  • $id (?string) – The Commit id (default: auto-generated)

Returns:

A new instance of Commit

Return type:

Commit

withComment(string $comment)

Add a comment

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Commit with the comment

Return type:

Commit