Code Duplication    Length = 16-16 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php 1 location

@@ 131-146 (lines=16) @@
128
     *
129
     * @return string[][]
130
     */
131
    public function loadAllSectionData()
132
    {
133
        $query = $this->dbHandler->createSelectQuery();
134
        $query->select(
135
            $this->dbHandler->quoteColumn('id'),
136
            $this->dbHandler->quoteColumn('identifier'),
137
            $this->dbHandler->quoteColumn('name')
138
        )->from(
139
            $this->dbHandler->quoteTable('ezsection')
140
        );
141
142
        $statement = $query->prepare();
143
        $statement->execute();
144
145
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
146
    }
147
148
    /**
149
     * Loads data for section with $identifier.

eZ/Publish/Core/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php 1 location

@@ 942-957 (lines=16) @@
939
     * @param mixed $contentId
940
     * @param mixed $versionNo
941
     */
942
    public function updateLocationsContentVersionNo($contentId, $versionNo)
943
    {
944
        $query = $this->handler->createUpdateQuery();
945
        $query->update(
946
            $this->handler->quoteTable('ezcontentobject_tree')
947
        )->set(
948
            $this->handler->quoteColumn('contentobject_version'),
949
            $query->bindValue($versionNo, null, \PDO::PARAM_INT)
950
        )->where(
951
            $query->expr->eq(
952
                $this->handler->quoteColumn('contentobject_id'),
953
                $contentId
954
            )
955
        );
956
        $query->prepare()->execute();
957
    }
958
959
    /**
960
     * Searches for the main nodeId of $contentId in $versionId.