original_string: public function serialize(DomainEvent $event): string {
          $reflect = new ReflectionObject($event);
          $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PRIVATE);
  
          return json_encode([
              'eventName' => $this->eventNameForClass(get_class($event)),
              'fields'    => $this->serializeFields($props, $event),
          ]);
      }
code: public function serialize(DomainEvent $event): string {
          $reflect = new ReflectionObject($event);
          $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PRIVATE);
  
          return json_encode([
              'eventName' => $this->eventNameForClass(get_class($event)),
              'fields'    => $this->serializeFields($props, $event),
          ]);
      }
code_tokens: public function serialize ( DomainEvent $ event ) : string { $ reflect = new ReflectionObject ( $ event ) ; $ props = $ reflect -> getProperties ( ReflectionProperty :: IS_PUBLIC | ReflectionProperty :: IS_PRIVATE ) ; return json_encode ( [ 'eventName' => $ this -> eventNameForClass ( get_class ( $ event ) ) , 'fields' => $ this -> serializeFields ( $ props , $ event ) , ] ) ; }
docstring: serialize a domain event into event sourcery library
  storage conventions
  @param DomainEvent $event
  @return string
docstring_tokens: serialize a domain event into event sourcery library storage conventions