Code Duplication    Length = 10-10 lines in 2 locations

src/EventSourcing/DBAL/EventStream.php 1 location

@@ 168-177 (lines=10) @@
165
     * @param $row
166
     * @return DomainMessage
167
     */
168
    private function deserializeEvent($row)
169
    {
170
        return new DomainMessage(
171
            $row['uuid'],
172
            $row['playhead'],
173
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
174
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
175
            DateTime::fromString($row['recorded_on'])
176
        );
177
    }
178
}
179

src/EventSourcing/DBAL/AggregateAwareDBALEventStore.php 1 location

@@ 237-246 (lines=10) @@
234
     * @param $row
235
     * @return DomainMessage
236
     */
237
    private function deserializeEvent($row)
238
    {
239
        return new DomainMessage(
240
            $row['uuid'],
241
            $row['playhead'],
242
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
243
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
244
            BroadwayDateTime::fromString($row['recorded_on'])
245
        );
246
    }
247
248
    /**
249
     * @param $id