Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 246-252 (lines=7) @@
243
    {
244
        do {
245
            $contentIds = [];
246
            for ($i = 0; $i < $iterationCount; ++$i) {
247
                if ($contentId = $stmt->fetch(PDO::FETCH_COLUMN)) {
248
                    $contentIds[] = $contentId;
249
                } else {
250
                    break;
251
                }
252
            }
253
254
            yield $contentIds;
255
        } while (!empty($contentId));

eZ/Publish/Core/Search/Common/IterativelyIndexer.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