cancelled = true; } public function isCancelled(): bool { if (!$this->cancelled && $this->checker !== null && ($this->checker)()) { $this->cancelled = true; } return $this->cancelled; } }