Choice Class

class Choice

Represents a Choice

Implements StateInterface

__construct(?string $id)

Create a Choice

Parameters:
  • $id (?string) – The state id (default: auto-generate)

Returns:

An instance of Choice

Return type:

Choice

withComment(string $comment)

Add a comment

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Choice with the comment

Return type:

Choice