public function pay() : PaymentState;
/** * @throws InvalidTransitionException */ public function pay() { $this->state = $this->state->pay(); $this->wasPaidAt = new \DateTimeImmutable(); }