Skip to content

Commit

Permalink
Merge pull request #1052 from nextcloud/fix/type-from-master
Browse files Browse the repository at this point in the history
Change return type to handle change from master
  • Loading branch information
CarlSchwan authored Jun 13, 2022
2 parents 84f7b89 + 0be740e commit 40a4ba9
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions lib/Tools/Db/ExtendedQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
use OCA\Circles\Tools\Traits\TArrayTools;
use OCP\DB\QueryBuilder\ICompositeExpression;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\QueryBuilder\IQueryFunction;
use OCP\IDBConnection;
use Psr\Log\LoggerInterface;

Expand Down Expand Up @@ -415,16 +416,7 @@ public function exprLike(string $field, string $value, string $alias = '', bool
}
}


/**
* @param string $field
* @param string $value
* @param string $alias
* @param bool $cs
*
* @return string
*/
public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string {
public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand All @@ -442,15 +434,7 @@ public function exprLimit(string $field, string $value, string $alias = '', bool
}
}


/**
* @param string $field
* @param int $value
* @param string $alias
*
* @return string
*/
public function exprLimitInt(string $field, int $value, string $alias = ''): string {
public function exprLimitInt(string $field, int $value, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand All @@ -468,7 +452,7 @@ public function exprLimitInt(string $field, int $value, string $alias = ''): str
*
* @return string
*/
public function exprLimitBool(string $field, bool $value, string $alias = ''): string {
public function exprLimitBool(string $field, bool $value, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand Down Expand Up @@ -569,7 +553,7 @@ public function exprLimitArray(
*
* @return string
*/
public function exprLimitInArray(string $field, array $values, string $alias = ''): string {
public function exprLimitInArray(string $field, array $values, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand All @@ -587,7 +571,7 @@ public function exprLimitInArray(string $field, array $values, string $alias = '
*
* @return string
*/
public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string {
public function exprLimitBitwise(string $field, int $flag, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand All @@ -609,7 +593,7 @@ public function exprLimitBitwise(string $field, int $flag, string $alias = ''):
*
* @return string
*/
public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string {
public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand All @@ -631,7 +615,7 @@ public function exprLt(string $field, int $value, bool $lte = false, string $ali
*
* @return string
*/
public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string {
public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): IQueryFunction {
if ($this->getType() === DBALQueryBuilder::SELECT) {
$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
}
Expand Down

0 comments on commit 40a4ba9

Please sign in to comment.