$reasons why the intake decided so * @param list $missing what the new case will not know yet */ public function __construct( public readonly IntakeOutcome $outcome, public readonly array $reasons = [], public readonly ?Booking $booking = null, public readonly ?CaseType $caseType = null, public readonly array $missing = [], public readonly ?string $reference = null, ) {} public function withBooking(Booking $booking): self { return new self($this->outcome, $this->reasons, $booking, $this->caseType ?? $booking->case_type, $this->missing, $this->reference); } /** * @param list $reasons */ public function as(IntakeOutcome $outcome, array $reasons): self { return new self($outcome, $reasons, $this->booking, $this->caseType, $this->missing, $this->reference); } }