Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 177-183 (lines=7) @@
174
    {
175
        do {
176
            $contentIds = [];
177
            for ($i = 0; $i < $iterationCount; ++$i) {
178
                if ($contentId = $stmt->fetch(PDO::FETCH_COLUMN)) {
179
                    $contentIds[] = $contentId;
180
                } else {
181
                    break;
182
                }
183
            }
184
185
            yield $contentIds;
186
        } while ($contentId);

eZ/Publish/Core/Search/Common/IterativelyIndexer.php 1 location

@@ 47-53 (lines=7) @@
44
        $i = 0;
45
        do {
46
            $contentIds = [];
47
            for ($k = 0; $k <= $iterationCount; ++$k) {
48
                if (!$row = $stmt->fetch(PDO::FETCH_ASSOC)) {
49
                    break;
50
                }
51
52
                $contentIds[] = $row['id'];
53
            }
54
55
            $this->updateSearchIndex($contentIds);
56
            if ($commit && method_exists($this->searchHandler, 'commit')) {