src/Domain/Messaging/Event/EventMessage.php
public static function create(Event $event): EventMessage
    {
        $timestamp = DateTime::now();
        $id = MessageId::generate();
        $metaData = MetaData::create();

        return new static($id, $timestamp, $event, $metaData);
    }
public static function create(Event $event): EventMessage
    {
        $timestamp = DateTime::now();
        $id = MessageId::generate();
        $metaData = MetaData::create();

        return new static($id, $timestamp, $event, $metaData);
    }
public static function create ( Event $ event ) : EventMessage { $ timestamp = DateTime :: now ( ) ; $ id = MessageId :: generate ( ) ; $ metaData = MetaData :: create ( ) ; return new static ( $ id , $ timestamp , $ event , $ metaData ) ; }
Creates instance for an event

@param Event $event The event

@return EventMessage
Creates instance for an event