original_string: private function mutate($event)
      {
          $method = 'on' . (string) new EventName($event);
  
          if (method_exists($this, $method)) {
              $this->$method($event);
          } else {
              throw new \RuntimeException(sprintf('Method %s does not exist on aggregate %s', $method, get_class($this)));
          }
      }
code: private function mutate($event)
      {
          $method = 'on' . (string) new EventName($event);
  
          if (method_exists($this, $method)) {
              $this->$method($event);
          } else {
              throw new \RuntimeException(sprintf('Method %s does not exist on aggregate %s', $method, get_class($this)));
          }
      }
code_tokens: private function mutate ( $ event ) { $ method = 'on' . ( string ) new EventName ( $ event ) ; if ( method_exists ( $ this , $ method ) ) { $ this -> $ method ( $ event ) ; } else { throw new \ RuntimeException ( sprintf ( 'Method %s does not exist on aggregate %s' , $ method , get_class ( $ this ) ) ) ; } }
docstring: Update in-memory state.
  
  @param object $event
docstring_tokens: Update in - memory state .