Code Duplication    Length = 14-14 lines in 3 locations

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

@@ 977-990 (lines=14) @@
974
     *
975
     * @return array
976
     */
977
    public function loadContentInfo($contentId)
978
    {
979
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
980
        $queryBuilder
981
            ->where('c.id = :id')
982
            ->setParameter('id', $contentId, ParameterType::INTEGER);
983
984
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
985
        if (empty($results)) {
986
            throw new NotFound('content', "id: $contentId");
987
        }
988
989
        return $results[0];
990
    }
991
992
    public function loadContentInfoList(array $contentIds)
993
    {
@@ 1013-1026 (lines=14) @@
1010
     *
1011
     * @return array
1012
     */
1013
    public function loadContentInfoByRemoteId($remoteId)
1014
    {
1015
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1016
        $queryBuilder
1017
            ->where('c.remote_id = :id')
1018
            ->setParameter('id', $remoteId, ParameterType::STRING);
1019
1020
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1021
        if (empty($results)) {
1022
            throw new NotFound('content', "remote_id: $remoteId");
1023
        }
1024
1025
        return $results[0];
1026
    }
1027
1028
    /**
1029
     * Loads info for a content object identified by its location ID (node ID).
@@ 1039-1052 (lines=14) @@
1036
     *
1037
     * @return array
1038
     */
1039
    public function loadContentInfoByLocationId($locationId)
1040
    {
1041
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1042
        $queryBuilder
1043
            ->where('t.main_node_id = :id')
1044
            ->setParameter('id', $locationId, ParameterType::INTEGER);
1045
1046
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1047
        if (empty($results)) {
1048
            throw new NotFound('content', "main_node_id: $locationId");
1049
        }
1050
1051
        return $results[0];
1052
    }
1053
1054
    /**
1055
     * Loads version info for content identified by $contentId and $versionNo.