Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 965-978 (lines=14) @@
962
     *
963
     * @return array
964
     */
965
    public function loadContentInfo($contentId)
966
    {
967
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
968
        $queryBuilder
969
            ->where('c.id = :id')
970
            ->setParameter('id', $contentId, ParameterType::INTEGER);
971
972
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
973
        if (empty($results)) {
974
            throw new NotFound('content', "id: $contentId");
975
        }
976
977
        return $results[0];
978
    }
979
980
    public function loadContentInfoList(array $contentIds)
981
    {
@@ 1001-1014 (lines=14) @@
998
     *
999
     * @return array
1000
     */
1001
    public function loadContentInfoByRemoteId($remoteId)
1002
    {
1003
        $queryBuilder = $this->createLoadContentInfoQueryBuilder();
1004
        $queryBuilder
1005
            ->where('c.remote_id = :id')
1006
            ->setParameter('id', $remoteId, ParameterType::STRING);
1007
1008
        $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE);
1009
        if (empty($results)) {
1010
            throw new NotFound('content', "remote_id: $remoteId");
1011
        }
1012
1013
        return $results[0];
1014
    }
1015
1016
    /**
1017
     * Loads info for a content object identified by its location ID (node ID).