Code Duplication    Length = 12-19 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/ContentHandler.php 2 locations

@@ 161-172 (lines=12) @@
158
    /**
159
     * {@inheritdoc}
160
     */
161
    public function updateContent($contentId, $versionNo, UpdateStruct $struct)
162
    {
163
        $this->logger->logCall(__METHOD__, array('content' => $contentId, 'version' => $versionNo, 'struct' => $struct));
164
        $content = $this->persistenceHandler->contentHandler()->updateContent($contentId, $versionNo, $struct);
165
        $this->cache->clear('content', $contentId, $versionNo);
166
        $this->cache
167
            ->getItem('content', $contentId, $versionNo, self::ALL_TRANSLATIONS_KEY)
168
            ->set($content)
169
            ->save();
170
171
        return $content;
172
    }
173
174
    /**
175
     * {@inheritdoc}
@@ 324-342 (lines=19) @@
321
    /**
322
     * {@inheritdoc}
323
     */
324
    public function deleteTranslationFromVersion($contentId, $versionNo, $languageCode)
325
    {
326
        $this->logger->logCall(
327
            __METHOD__,
328
            ['content' => $contentId, 'version' => $versionNo, 'languageCode' => $languageCode]
329
        );
330
        $content = $this->persistenceHandler->contentHandler()->deleteTranslationFromVersion(
331
            $contentId,
332
            $versionNo,
333
            $languageCode
334
        );
335
        $this->cache->clear('content', $contentId, $versionNo);
336
        $this->cache
337
            ->getItem('content', $contentId, $versionNo, self::ALL_TRANSLATIONS_KEY)
338
            ->set($content)
339
            ->save();
340
341
        return $content;
342
    }
343
}
344