public function cancelTimeout() { if ($this->timer !== null) { Timer::remove($this->timer); $this->timer = null; } }