original_string: final protected function raise(DomainEvent $event) : void
      {
          $this->setStateHash($this->calculateNextStateHash($event));
          if ($event instanceof AbstractDomainEvent) {
              AbstractDomainEvent::initEvent($event, $this->getId(), $this->stateHash());
          }
          EventPublisher::instance()->post($event);
      }
code: final protected function raise(DomainEvent $event) : void
      {
          $this->setStateHash($this->calculateNextStateHash($event));
          if ($event instanceof AbstractDomainEvent) {
              AbstractDomainEvent::initEvent($event, $this->getId(), $this->stateHash());
          }
          EventPublisher::instance()->post($event);
      }
code_tokens: final protected function raise ( DomainEvent $ event ) : void { $ this -> setStateHash ( $ this -> calculateNextStateHash ( $ event ) ) ; if ( $ event instanceof AbstractDomainEvent ) { AbstractDomainEvent :: initEvent ( $ event , $ this -> getId ( ) , $ this -> stateHash ( ) ) ; } EventPublisher :: instance ( ) -> post ( $ event ) ; }
docstring: Updates the state hash and sends the DomainEvent to the EventPublisher.
  It also automatically fills the raised event if it extends AbstractDomainEvent.
  
  @param DomainEvent $event
docstring_tokens: Updates the state hash and sends the DomainEvent to the EventPublisher . It also automatically fills the raised event if it extends AbstractDomainEvent .