Skip to content

Commit 1f3fadc

Browse files
committed
Database Builder typos changes
1 parent 2e95291 commit 1f3fadc

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

system/Database/BaseBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,18 +1251,18 @@ public function orderBy(string $orderBy, string $direction = '', bool $escape =
12511251

12521252
if ($escape === false)
12531253
{
1254-
$qb_orderby[] = [
1254+
$qb_orderBy[] = [
12551255
'field' => $orderBy,
12561256
'direction' => $direction,
12571257
'escape' => false,
12581258
];
12591259
}
12601260
else
12611261
{
1262-
$qb_orderby = [];
1262+
$qb_orderBy = [];
12631263
foreach (explode(',', $orderBy) as $field)
12641264
{
1265-
$qb_orderby[] = ($direction === '' && preg_match('/\s+(ASC|DESC)$/i', rtrim($field), $match, PREG_OFFSET_CAPTURE))
1265+
$qb_orderBy[] = ($direction === '' && preg_match('/\s+(ASC|DESC)$/i', rtrim($field), $match, PREG_OFFSET_CAPTURE))
12661266
?
12671267
[
12681268
'field' => ltrim(substr($field, 0, $match[0][1])),
@@ -1278,7 +1278,7 @@ public function orderBy(string $orderBy, string $direction = '', bool $escape =
12781278
}
12791279
}
12801280

1281-
$this->QBOrderBy = array_merge($this->QBOrderBy, $qb_orderby);
1281+
$this->QBOrderBy = array_merge($this->QBOrderBy, $qb_orderBy);
12821282

12831283
return $this;
12841284
}

system/Database/Postgre/Builder.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class Builder extends BaseBuilder
5353
*/
5454
protected $randomKeyword = [
5555
'RANDOM()',
56-
'RANDOM()',
5756
];
5857

5958
//--------------------------------------------------------------------
@@ -98,7 +97,7 @@ public function orderBy(string $orderBy, string $direction = '', bool $escape =
9897
* @param string $column
9998
* @param integer $value
10099
*
101-
* @return boolean
100+
* @return mixed
102101
*/
103102
public function increment(string $column, int $value = 1)
104103
{
@@ -117,7 +116,7 @@ public function increment(string $column, int $value = 1)
117116
* @param string $column
118117
* @param integer $value
119118
*
120-
* @return boolean
119+
* @return mixed
121120
*/
122121
public function decrement(string $column, int $value = 1)
123122
{
@@ -141,7 +140,7 @@ public function decrement(string $column, int $value = 1)
141140
* @param array $set An associative array of insert values
142141
* @param boolean $returnSQL
143142
*
144-
* @return boolean TRUE on success, FALSE on failure
143+
* @return mixed
145144
* @throws DatabaseException
146145
* @internal param true $bool returns the generated SQL, false executes the query.
147146
*/

0 commit comments

Comments
 (0)