protected function getMessageFromEvent(ResourceEventInterface $event)
    {
        $message = $event->getResource();

        if (!$message instanceof TicketMessageInterface) {
            throw new UnexpectedValueException("Expected instance of " . TicketMessageInterface::class);
        }

        return $message;
    }
protected function getMessageFromEvent(ResourceEventInterface $event)
    {
        $message = $event->getResource();

        if (!$message instanceof TicketMessageInterface) {
            throw new UnexpectedValueException("Expected instance of " . TicketMessageInterface::class);
        }

        return $message;
    }
Returns the message from the event.

@param ResourceEventInterface $event

@return TicketMessageInterface