Code Duplication    Length = 10-10 lines in 2 locations

src/EventSourcing/DBAL/AggregateAwareDBALEventStore.php 1 location

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

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