eventName ?? get_class($this); } /** * @return bool * * @throws \BadMethodCallException */ public function isCancelled() : bool{ if(!($this instanceof Cancellable)){ throw new \BadMethodCallException("Event is not Cancellable"); } /** @var Event $this */ return $this->isCancelled; } /** * @param bool $value * * @throws \BadMethodCallException */ public function setCancelled(bool $value = true) : void{ if(!($this instanceof Cancellable)){ throw new \BadMethodCallException("Event is not Cancellable"); } /** @var Event $this */ $this->isCancelled = $value; } }