Code Duplication    Length = 14-14 lines in 3 locations

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

@@ 996-1009 (lines=14) @@
993
     *
994
     * @return array
995
     */
996
    public function loadContentInfo($contentId)
997
    {
998
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
999
        $queryBuilder
1000
            ->where('c.id = :id')
1001
            ->setParameter('id', $contentId, PDO::PARAM_INT);
1002
1003
        $results = $queryBuilder->execute()->fetchAll(PDO::FETCH_ASSOC);
1004
        if (empty($results)) {
1005
            throw new NotFound('content', "id: $contentId");
1006
        }
1007
1008
        return $results[0];
1009
    }
1010
1011
    public function loadContentInfoList(array $contentIds)
1012
    {
@@ 1032-1045 (lines=14) @@
1029
     *
1030
     * @return array
1031
     */
1032
    public function loadContentInfoByRemoteId($remoteId)
1033
    {
1034
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1035
        $queryBuilder
1036
            ->where('c.remote_id = :id')
1037
            ->setParameter('id', $remoteId, PDO::PARAM_STR);
1038
1039
        $results = $queryBuilder->execute()->fetchAll(PDO::FETCH_ASSOC);
1040
        if (empty($results)) {
1041
            throw new NotFound('content', "remote_id: $remoteId");
1042
        }
1043
1044
        return $results[0];
1045
    }
1046
1047
    /**
1048
     * Loads info for a content object identified by its location ID (node ID).
@@ 1058-1071 (lines=14) @@
1055
     *
1056
     * @return array
1057
     */
1058
    public function loadContentInfoByLocationId($locationId)
1059
    {
1060
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1061
        $queryBuilder
1062
            ->where('t.main_node_id = :id')
1063
            ->setParameter('id', $locationId, PDO::PARAM_INT);
1064
1065
        $results = $queryBuilder->execute()->fetchAll(PDO::FETCH_ASSOC);
1066
        if (empty($results)) {
1067
            throw new NotFound('content', "main_node_id: $locationId");
1068
        }
1069
1070
        return $results[0];
1071
    }
1072
1073
    /**
1074
     * Loads version info for content identified by $contentId and $versionNo.