Code Duplication    Length = 9-9 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php 1 location

@@ 154-162 (lines=9) @@
151
        $this->items[$key] = $this->getIterator()->current();
152
    }
153
154
    private function wrapTraversable(Traversable $traversable) : Generator
155
    {
156
        foreach ($traversable as $key => $value) {
157
            yield $key => $value;
158
            $this->iteratorAdvanced = true;
159
        }
160
161
        $this->iteratorExhausted = true;
162
    }
163
}
164

lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php 1 location

@@ 130-138 (lines=9) @@
127
        }
128
    }
129
130
    private function wrapTraversable(Traversable $traversable) : Generator
131
    {
132
        foreach ($traversable as $key => $value) {
133
            yield $key => $value;
134
            $this->iteratorAdvanced = true;
135
        }
136
137
        $this->iterator = null;
138
    }
139
}
140