Code Duplication    Length = 14-14 lines in 3 locations

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

@@ 1041-1054 (lines=14) @@
1038
     *
1039
     * @return array
1040
     */
1041
    public function loadContentInfo($contentId)
1042
    {
1043
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1044
        $queryBuilder
1045
            ->where('c.id = :id')
1046
            ->setParameter('id', $contentId, ParameterType::INTEGER);
1047
1048
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1049
        if (empty($results)) {
1050
            throw new NotFound('content', "id: $contentId");
1051
        }
1052
1053
        return $results[0];
1054
    }
1055
1056
    public function loadContentInfoList(array $contentIds)
1057
    {
@@ 1077-1090 (lines=14) @@
1074
     *
1075
     * @return array
1076
     */
1077
    public function loadContentInfoByRemoteId($remoteId)
1078
    {
1079
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1080
        $queryBuilder
1081
            ->where('c.remote_id = :id')
1082
            ->setParameter('id', $remoteId, ParameterType::STRING);
1083
1084
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1085
        if (empty($results)) {
1086
            throw new NotFound('content', "remote_id: $remoteId");
1087
        }
1088
1089
        return $results[0];
1090
    }
1091
1092
    /**
1093
     * Loads info for a content object identified by its location ID (node ID).
@@ 1103-1116 (lines=14) @@
1100
     *
1101
     * @return array
1102
     */
1103
    public function loadContentInfoByLocationId($locationId)
1104
    {
1105
        $queryBuilder = $this->createLoadContentInfoQueryBuilder(false);
1106
        $queryBuilder
1107
            ->where('t.node_id = :id')
1108
            ->setParameter('id', $locationId, ParameterType::INTEGER);
1109
1110
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1111
        if (empty($results)) {
1112
            throw new NotFound('content', "node_id: $locationId");
1113
        }
1114
1115
        return $results[0];
1116
    }
1117
1118
    /**
1119
     * Loads version info for content identified by $contentId and $versionNo.