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

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