Code Duplication    Length = 7-7 lines in 2 locations

eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php 1 location

@@ 260-266 (lines=7) @@
257
    {
258
        do {
259
            $contentIds = [];
260
            for ($i = 0; $i < $iterationCount; ++$i) {
261
                if ($contentId = $stmt->fetch(PDO::FETCH_COLUMN)) {
262
                    $contentIds[] = $contentId;
263
                } else {
264
                    break;
265
                }
266
            }
267
268
            yield $contentIds;
269
        } while (!empty($contentId));

eZ/Publish/Core/Search/Common/IncrementalIndexer.php 1 location

@@ 48-54 (lines=7) @@
45
        $i = 0;
46
        do {
47
            $contentIds = [];
48
            for ($k = 0; $k <= $iterationCount; ++$k) {
49
                if (!$row = $stmt->fetch(PDO::FETCH_ASSOC)) {
50
                    break;
51
                }
52
53
                $contentIds[] = $row['id'];
54
            }
55
56
            $this->updateSearchIndex($contentIds, $commit);
57