Code Duplication    Length = 3-3 lines in 2 locations

framework/db/DBObject.php 1 location

@@ 510-512 (lines=3) @@
507
            if (!empty($this->dbQuery->order)) {
508
                $this->dbQuery->query.= " ORDER BY";
509
                if (is_array($this->dbQuery->order)) {
510
                    foreach ($this->dbQuery->order as $fieldName => $ord) {
511
                        $this->dbQuery->query.= " " . $fieldName . " " . $ord . ",";
512
                    }
513
                    $this->dbQuery->query = substr($this->dbQuery->query, 0, strlen($this->dbQuery->query) - 1);
514
                } elseif (is_string($this->dbQuery->order)) {
515
                    $this->dbQuery->query.= " " . $this->dbQuery->order;

framework/db/DBPreparedQuery.php 1 location

@@ 98-100 (lines=3) @@
95
        if (!empty($this->order)) {
96
            $this->query.= " ORDER BY";
97
            if (is_array($this->order)) {
98
                foreach ($this->order as $fieldName => $ord) {
99
                    $this->query.= " " . $fieldName . " " . $ord . ",";
100
                }
101
                $this->query = substr($this->query, 0, strlen($this->query) - 1);
102
            } elseif (is_string($this->order)) {
103
                $this->query.= " " . $this->order;