protected function apply(DomainEvent $event): void {
        $eventName = explode('\\', get_class($event));

        $method = 'apply' . $eventName[count($eventName) - 1];

        if (method_exists($this, $method)) {
            $this->$method($event);
        }

        $this->version = $this->version->next();
    }