Code Duplication    Length = 15-16 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php 2 locations

@@ 2149-2164 (lines=16) @@
2146
     * @param string $languageCode language code of the translation
2147
     * @throws \Doctrine\DBAL\DBALException
2148
     */
2149
    public function deleteTranslationFromContent($contentId, $languageCode)
2150
    {
2151
        $language = $this->languageHandler->loadByLanguageCode($languageCode);
2152
2153
        $this->connection->beginTransaction();
2154
        try {
2155
            $this->deleteTranslationFromContentVersions($contentId, $language->id);
2156
            $this->deleteTranslationFromContentNames($contentId, $languageCode);
2157
            $this->deleteTranslationFromContentObject($contentId, $language->id);
2158
2159
            $this->connection->commit();
2160
        } catch (DBALException $e) {
2161
            $this->connection->rollBack();
2162
            throw $e;
2163
        }
2164
    }
2165
2166
    /**
2167
     * Delete Content fields (attributes) for the given Translation.
@@ 2207-2221 (lines=15) @@
2204
     * @param string $languageCode
2205
     * @throws \Doctrine\DBAL\DBALException
2206
     */
2207
    public function deleteTranslationFromVersion($contentId, $versionNo, $languageCode)
2208
    {
2209
        $language = $this->languageHandler->loadByLanguageCode($languageCode);
2210
2211
        $this->connection->beginTransaction();
2212
        try {
2213
            $this->deleteTranslationFromContentVersions($contentId, $language->id, $versionNo);
2214
            $this->deleteTranslationFromContentNames($contentId, $languageCode, $versionNo);
2215
2216
            $this->connection->commit();
2217
        } catch (DBALException $e) {
2218
            $this->connection->rollBack();
2219
            throw $e;
2220
        }
2221
    }
2222
2223
    /**
2224
     * Delete translation from the ezcontentobject_name table.