Code Duplication    Length = 39-39 lines in 2 locations

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

@@ 828-866 (lines=39) @@
825
     *
826
     * @return array
827
     */
828
    public function loadAutogeneratedEntry($action, $parentId = null)
829
    {
830
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
831
        $query = $this->dbHandler->createSelectQuery();
832
        $query->select(
833
            '*'
834
        )->from(
835
            $this->dbHandler->quoteTable($this->table)
836
        )->where(
837
            $query->expr->lAnd(
838
                $query->expr->eq(
839
                    $this->dbHandler->quoteColumn('action'),
840
                    $query->bindValue($action, null, \PDO::PARAM_STR)
841
                ),
842
                $query->expr->eq(
843
                    $this->dbHandler->quoteColumn('is_original'),
844
                    $query->bindValue(1, null, \PDO::PARAM_INT)
845
                ),
846
                $query->expr->eq(
847
                    $this->dbHandler->quoteColumn('is_alias'),
848
                    $query->bindValue(0, null, \PDO::PARAM_INT)
849
                )
850
            )
851
        );
852
853
        if (isset($parentId)) {
854
            $query->where(
855
                $query->expr->eq(
856
                    $this->dbHandler->quoteColumn('parent'),
857
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
858
                )
859
            );
860
        }
861
862
        $statement = $query->prepare();
863
        $statement->execute();
864
865
        return $statement->fetch(\PDO::FETCH_ASSOC);
866
    }
867
868
    /**
869
     * Loads all data for the path identified by given $id.
@@ 1090-1128 (lines=39) @@
1087
     *
1088
     * @return array
1089
     */
1090
    public function loadAutogeneratedEntries($parentId, $includeHistory = false)
1091
    {
1092
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
1093
        $query = $this->dbHandler->createSelectQuery();
1094
        $query->select(
1095
            '*'
1096
        )->from(
1097
            $this->dbHandler->quoteTable($this->table)
1098
        )->where(
1099
            $query->expr->lAnd(
1100
                $query->expr->eq(
1101
                    $this->dbHandler->quoteColumn('parent'),
1102
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
1103
                ),
1104
                $query->expr->eq(
1105
                    $this->dbHandler->quoteColumn('action_type'),
1106
                    $query->bindValue('eznode', null, \PDO::PARAM_STR)
1107
                ),
1108
                $query->expr->eq(
1109
                    $this->dbHandler->quoteColumn('is_alias'),
1110
                    $query->bindValue(0, null, \PDO::PARAM_INT)
1111
                )
1112
            )
1113
        );
1114
1115
        if (!$includeHistory) {
1116
            $query->where(
1117
                $query->expr->eq(
1118
                    $this->dbHandler->quoteColumn('is_original'),
1119
                    $query->bindValue(1, null, \PDO::PARAM_INT)
1120
                )
1121
            );
1122
        }
1123
1124
        $statement = $query->prepare();
1125
        $statement->execute();
1126
1127
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
1128
    }
1129
1130
    public function getLocationContentMainLanguageId($locationId)
1131
    {