Code Duplication    Length = 14-18 lines in 2 locations

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

@@ 31-44 (lines=14) @@
28
    /**
29
     * Create select query to query content name data.
30
     */
31
    public function createNamesQuery(): DoctrineQueryBuilder
32
    {
33
        $query = $this->connection->createQueryBuilder();
34
        $query
35
            ->select(
36
                'contentobject_id AS ezcontentobject_name_contentobject_id',
37
                'content_version AS ezcontentobject_name_content_version',
38
                'name AS ezcontentobject_name_name',
39
                'content_translation AS ezcontentobject_name_content_translation'
40
            )
41
            ->from(Gateway::CONTENT_NAME_TABLE);
42
43
        return $query;
44
    }
45
46
    /**
47
     * Create a select query for content relations.
@@ 49-66 (lines=18) @@
46
    /**
47
     * Create a select query for content relations.
48
     */
49
    public function createRelationFindQueryBuilder(): DoctrineQueryBuilder
50
    {
51
        $query = $this->connection->createQueryBuilder();
52
        $query
53
            ->select(
54
                'l.id AS ezcontentobject_link_id',
55
                'l.contentclassattribute_id AS ezcontentobject_link_contentclassattribute_id',
56
                'l.from_contentobject_id AS ezcontentobject_link_from_contentobject_id',
57
                'l.from_contentobject_version AS ezcontentobject_link_from_contentobject_version',
58
                'l.relation_type AS ezcontentobject_link_relation_type',
59
                'l.to_contentobject_id AS ezcontentobject_link_to_contentobject_id'
60
            )
61
            ->from(
62
                Gateway::CONTENT_RELATION_TABLE, 'l'
63
            );
64
65
        return $query;
66
    }
67
68
    /**
69
     * Create an update query for setting Content item Version status.