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

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