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

        return new static($id, $timestamp, $query, $metaData);
    }
public static function create(Query $query): QueryMessage
    {
        $timestamp = DateTime::now();
        $id = MessageId::generate();
        $metaData = MetaData::create();

        return new static($id, $timestamp, $query, $metaData);
    }
public static function create ( Query $ query ) : QueryMessage { $ timestamp = DateTime :: now ( ) ; $ id = MessageId :: generate ( ) ; $ metaData = MetaData :: create ( ) ; return new static ( $ id , $ timestamp , $ query , $ metaData ) ; }
Creates instance for a query

@param Query $query The query

@return QueryMessage
Creates instance for a query