Code Duplication    Length = 10-10 lines in 2 locations

src/EventSourcing/DBAL/EventStream.php 1 location

@@ 193-202 (lines=10) @@
190
     * @param $row
191
     * @return DomainMessage
192
     */
193
    private function deserializeEvent($row)
194
    {
195
        return new DomainMessage(
196
            $row['uuid'],
197
            $row['playhead'],
198
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
199
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
200
            DateTime::fromString($row['recorded_on'])
201
        );
202
    }
203
}
204

src/EventSourcing/DBAL/AggregateAwareDBALEventStore.php 1 location

@@ 200-209 (lines=10) @@
197
     * @param $row
198
     * @return DomainMessage
199
     */
200
    private function deserializeEvent($row)
201
    {
202
        return new DomainMessage(
203
            $row['uuid'],
204
            $row['playhead'],
205
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
206
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
207
            BroadwayDateTime::fromString($row['recorded_on'])
208
        );
209
    }
210
211
    /**
212
     * @param DomainEventStreamInterface $eventStream