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

@@ 350-356 (lines=7) @@
347
    {
348
        do {
349
            $contentIds = [];
350
            for ($i = 0; $i < $iterationCount; ++$i) {
351
                if ($contentId = $stmt->fetch(PDO::FETCH_COLUMN)) {
352
                    $contentIds[] = $contentId;
353
                } else {
354
                    break;
355
                }
356
            }
357
358
            yield $contentIds;
359
        } while (!empty($contentId));