Code Duplication    Length = 9-10 lines in 2 locations

eZ/Publish/Core/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php 2 locations

@@ 207-216 (lines=10) @@
204
    /**
205
     * Delete words not related to any content object.
206
     */
207
    public function deleteWordsWithoutObjects()
208
    {
209
        $query = $this->dbHandler->createDeleteQuery();
210
211
        $query->deleteFrom($this->dbHandler->quoteTable('ezsearch_word'))
212
            ->where($query->expr->eq($this->dbHandler->quoteColumn('object_count'), ':c'));
213
214
        $stmt = $query->prepare();
215
        $stmt->execute(['c' => 0]);
216
    }
217
218
    /**
219
     * Delete relation between a word and a content object.
@@ 223-231 (lines=9) @@
220
     *
221
     * @param $contentId
222
     */
223
    public function deleteObjectWordsLink($contentId)
224
    {
225
        $query = $this->dbHandler->createDeleteQuery();
226
        $query->deleteFrom($this->dbHandler->quoteTable('ezsearch_object_word_link'))
227
            ->where($query->expr->eq($this->dbHandler->quoteColumn('contentobject_id'), ':contentId'));
228
229
        $stmt = $query->prepare();
230
        $stmt->execute(['contentId' => $contentId]);
231
    }
232
233
    /**
234
     * Set query selecting word ids for content object (method was extracted to be reusable).