Code Duplication    Length = 8-8 lines in 2 locations

src/Governor/Framework/EventStore/Filesystem/FilesystemDomainEventStream.php 1 location

@@ 29-36 (lines=8) @@
26
    protected $events;
27
    protected $serializer;
28
29
    public function __construct(\SplFileObject $file,
30
        SerializerInterface $serializer)
31
    {
32
        $this->eventReader = new FilesystemEventMessageReader($file);
33
        $this->events = new \SplDoublyLinkedList();
34
        $this->serializer = $serializer;
35
        $this->doReadNext();
36
    }
37
38
    public function hasNext()
39
    {

src/Governor/Framework/EventStore/Filesystem/SnapshotFilesystemDomainEventStream.php 1 location

@@ 27-34 (lines=8) @@
24
     * @param \SplFileObject $file
25
     * @param \Governor\Framework\Serializer\SerializerInterface $serializer
26
     */
27
    public function __construct(SerializedDomainEventDataInterface $snapshotEvent,
28
        \SplFileObject $file, SerializerInterface $serializer)
29
    {
30
        $this->eventReader = new FilesystemEventMessageReader($file, $serializer);
31
        $this->events = new \SplDoublyLinkedList();
32
        $this->serializer = $serializer;
33
        $this->events->push($snapshotEvent);
34
    }
35
36
}
37