Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 2085-2100 (lines=16) @@
2082
     * @param string $languageCode language code of the translation
2083
     * @throws \Doctrine\DBAL\DBALException
2084
     */
2085
    public function deleteTranslationFromContent($contentId, $languageCode)
2086
    {
2087
        $language = $this->languageHandler->loadByLanguageCode($languageCode);
2088
2089
        $this->connection->beginTransaction();
2090
        try {
2091
            $this->deleteTranslationFromContentVersions($contentId, $language->id);
2092
            $this->deleteTranslationFromContentNames($contentId, $languageCode);
2093
            $this->deleteTranslationFromContentObject($contentId, $language->id);
2094
2095
            $this->connection->commit();
2096
        } catch (DBALException $e) {
2097
            $this->connection->rollBack();
2098
            throw $e;
2099
        }
2100
    }
2101
2102
    /**
2103
     * Delete Content fields (attributes) for the given Translation.
@@ 2143-2157 (lines=15) @@
2140
     * @param string $languageCode
2141
     * @throws \Doctrine\DBAL\DBALException
2142
     */
2143
    public function deleteTranslationFromVersion($contentId, $versionNo, $languageCode)
2144
    {
2145
        $language = $this->languageHandler->loadByLanguageCode($languageCode);
2146
2147
        $this->connection->beginTransaction();
2148
        try {
2149
            $this->deleteTranslationFromContentVersions($contentId, $language->id, $versionNo);
2150
            $this->deleteTranslationFromContentNames($contentId, $languageCode, $versionNo);
2151
2152
            $this->connection->commit();
2153
        } catch (DBALException $e) {
2154
            $this->connection->rollBack();
2155
            throw $e;
2156
        }
2157
    }
2158
2159
    /**
2160
     * Delete translation from the ezcontentobject_name table.