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

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