Code Duplication    Length = 10-10 lines in 2 locations

src/EventSourcing/DBAL/AggregateAwareDBALEventStore.php 1 location

@@ 206-215 (lines=10) @@
203
        return $this->loadStatement;
204
    }
205
206
    private function deserializeEvent(array $row): DomainMessage
207
    {
208
        return new DomainMessage(
209
            $row['uuid'],
210
            $row['playhead'],
211
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
212
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
213
            DateTime::fromString($row['recorded_on'])
214
        );
215
    }
216
217
    /**
218
     * Ensure that an error will be thrown if the ID in the domain messages is

src/EventSourcing/DBAL/EventStream.php 1 location

@@ 220-229 (lines=10) @@
217
        return $queryBuilder->execute();
218
    }
219
220
    private function deserializeEvent(array $row): DomainMessage
221
    {
222
        return new DomainMessage(
223
            $row['uuid'],
224
            $row['playhead'],
225
            $this->metadataSerializer->deserialize(json_decode($row['metadata'], true)),
226
            $this->payloadSerializer->deserialize(json_decode($row['payload'], true)),
227
            DateTime::fromString($row['recorded_on'])
228
        );
229
    }
230
}
231