private function serializeFields($props, $event) {
        array_map(function (ReflectionProperty $prop) use (&$fields, $event) {
            /** @var ReflectionProperty $prop */
            $prop->setAccessible(true);
            $fields[$prop->getName()] = $this->valueSerializer->serialize($prop->getValue($event));
        }, $props);

        return $fields;
    }
private function serializeFields($props, $event) {
        array_map(function (ReflectionProperty $prop) use (&$fields, $event) {
            /** @var ReflectionProperty $prop */
            $prop->setAccessible(true);
            $fields[$prop->getName()] = $this->valueSerializer->serialize($prop->getValue($event));
        }, $props);

        return $fields;
    }
private function serializeFields ( $ props , $ event ) { array_map ( function ( ReflectionProperty $ prop ) use ( & $ fields , $ event ) { /** @var ReflectionProperty $prop */ $ prop -> setAccessible ( true ) ; $ fields [ $ prop -> getName ( ) ] = $ this -> valueSerializer -> serialize ( $ prop -> getValue ( $ event ) ) ; } , $ props ) ; return $ fields ; }
Serialize the fields of a domain event into a key => value hash

@param $props
@param $event
@return mixed
Serialize the fields of a domain event into a key = > value hash