Code Duplication    Length = 7-7 lines in 2 locations

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

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

@@ 331-337 (lines=7) @@
328
    {
329
        do {
330
            $contentIds = [];
331
            for ($i = 0; $i < $iterationCount; ++$i) {
332
                if ($contentId = $stmt->fetch(PDO::FETCH_COLUMN)) {
333
                    $contentIds[] = $contentId;
334
                } else {
335
                    break;
336
                }
337
            }
338
339
            yield $contentIds;
340
        } while (!empty($contentId));