Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 1980-1996 (lines=17) @@
1977
     * @param int $contentId
1978
     * @param string $languageCode
1979
     */
1980
    private function deleteTranslationFromContentAttributes($contentId, $languageCode)
1981
    {
1982
        $query = $this->connection->createQueryBuilder();
1983
        $query
1984
            ->delete('ezcontentobject_attribute')
1985
            ->where('contentobject_id = :contentId')
1986
            ->andWhere('language_code = :languageCode')
1987
            ->setParameters(
1988
                [
1989
                    ':contentId' => $contentId,
1990
                    ':languageCode' => $languageCode,
1991
                ]
1992
            )
1993
        ;
1994
1995
        $query->execute();
1996
    }
1997
1998
    /**
1999
     * Delete translation from the ezcontentobject_name table.
@@ 2004-2020 (lines=17) @@
2001
     * @param $contentId
2002
     * @param $languageCode
2003
     */
2004
    private function deleteTranslationFromContentNames($contentId, $languageCode)
2005
    {
2006
        $query = $this->connection->createQueryBuilder();
2007
        $query
2008
            ->delete('ezcontentobject_name')
2009
            ->where('contentobject_id=:contentId')
2010
            ->andWhere('real_translation=:languageCode')
2011
            ->setParameters(
2012
                [
2013
                    ':languageCode' => $languageCode,
2014
                    ':contentId' => $contentId,
2015
                ]
2016
            )
2017
        ;
2018
2019
        $query->execute();
2020
    }
2021
2022
    /**
2023
     * Remove language from language_mask of ezcontentobject.