Code Duplication    Length = 16-16 lines in 3 locations

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

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

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

@@ 933-948 (lines=16) @@
930
     * @param mixed $contentId
931
     * @param mixed $versionNo
932
     */
933
    public function updateLocationsContentVersionNo($contentId, $versionNo)
934
    {
935
        $query = $this->handler->createUpdateQuery();
936
        $query->update(
937
            $this->handler->quoteTable('ezcontentobject_tree')
938
        )->set(
939
            $this->handler->quoteColumn('contentobject_version'),
940
            $query->bindValue($versionNo, null, \PDO::PARAM_INT)
941
        )->where(
942
            $query->expr->eq(
943
                $this->handler->quoteColumn('contentobject_id'),
944
                $contentId
945
            )
946
        );
947
        $query->prepare()->execute();
948
    }
949
950
    /**
951
     * Searches for the main nodeId of $contentId in $versionId.

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

@@ 394-409 (lines=16) @@
391
     *
392
     * @param string $hash
393
     */
394
    public function expireUserToken($hash)
395
    {
396
        $query = $this->handler->createUpdateQuery();
397
        $query
398
            ->update($this->handler->quoteTable('ezuser_accountkey'))
399
            ->set(
400
                $this->handler->quoteColumn('time'),
401
                $query->bindValue(0)
402
            )->where(
403
                $query->expr->eq(
404
                    $this->handler->quoteColumn('hash_key'),
405
                    $query->bindValue($hash, null, \PDO::PARAM_STR)
406
                )
407
            );
408
        $query->prepare()->execute();
409
    }
410
411
    /**
412
     * Assigns role to user with given limitation.