$requires dependencies for readiness (checked: every module exists, no cycle) * @param list $effects kinds of effects the step may cause: case_write, guest_mail, landlord_mail, document, calendar_hold, channel_task, network (checked by the contract test) * @param list $waits whom or what the step can wait for: guest, portal, landlord, time (describes) * @param list $triggers events after which the step is evaluated again (describes; listed in process:check) * @param list $parameters settings or module parameters that shape the step (checked: known) * @param string $toggle mandatory / optional / conditional / event_driven (checked: mandatory cannot be switched off) * @param list $performers who may carry the step out (checked against the models' responsibilities) * @param list $modes automatic / approval / manual (checked in the configurator) * @param list $events history types that belong to the step (shown behind the step) * @param list $points extension points the module may be inserted at (checked; empty = fixed place in a model) * @param bool $readsContractData evaluates frozen contract data – needs an ongoing-case test (checked) * @param list $executions the admissible ways to fulfil the task (V2.1; the model may narrow them) * @param string|null $condition when the step applies, in plain words (DESCRIBES – the logic is `applies()`, never read from here) * @param string|null $why why the task is mandatory, shown instead of a lock */ public function __construct( public string $label, public string $purpose, public string $phase, public array $requires = [], public array $effects = [], public array $waits = [], public array $triggers = [], public array $parameters = [], public string $toggle = self::TOGGLE_MANDATORY, public array $performers = ['system'], public array $modes = [], public array $events = [], public array $points = [], public bool $readsContractData = false, public string $availability = self::AVAILABILITY_PRODUCTION, public array $executions = [], public ?string $condition = null, public ?string $why = null, ) {} public function isOptional(): bool { return $this->toggle === self::TOGGLE_OPTIONAL; } public function isTesterOnly(): bool { return $this->availability === self::AVAILABILITY_TESTER_ONLY; } }