aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-03-04 22:38:31 +0100
committerGitHub <noreply@github.com>2021-03-04 22:38:31 +0100
commit5c9dacf786015ba4a2183bb0f567ab67f6ae3ca9 (patch)
treec52a6c5eb94bf4302590e0a1897ced933dd63cf3 /lib
parentb0fe408d1f08958d1d00c98810675cc8a70df686 (diff)
parentd7f7d3bc51e8301b40706f60cddb28569b782f45 (diff)
downloadnextcloud-server-5c9dacf786015ba4a2183bb0f567ab67f6ae3ca9.tar.gz
nextcloud-server-5c9dacf786015ba4a2183bb0f567ab67f6ae3ca9.zip
Merge pull request #25941 from nextcloud/techdept/CompositeExpression
Type CompositeExpression and ICompositeExpression
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/QueryBuilder/CompositeExpression.php10
-rw-r--r--lib/public/DB/QueryBuilder/ICompositeExpression.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/DB/QueryBuilder/CompositeExpression.php b/lib/private/DB/QueryBuilder/CompositeExpression.php
index 512343662ad..ae9e654d5bb 100644
--- a/lib/private/DB/QueryBuilder/CompositeExpression.php
+++ b/lib/private/DB/QueryBuilder/CompositeExpression.php
@@ -45,7 +45,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
*
* @return \OCP\DB\QueryBuilder\ICompositeExpression
*/
- public function addMultiple(array $parts = []) {
+ public function addMultiple(array $parts = []): ICompositeExpression {
$this->compositeExpression->addMultiple($parts);
return $this;
@@ -58,7 +58,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
*
* @return \OCP\DB\QueryBuilder\ICompositeExpression
*/
- public function add($part) {
+ public function add($part): ICompositeExpression {
$this->compositeExpression->add($part);
return $this;
@@ -69,7 +69,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
*
* @return integer
*/
- public function count() {
+ public function count(): int {
return $this->compositeExpression->count();
}
@@ -78,7 +78,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
*
* @return string
*/
- public function getType() {
+ public function getType(): string {
return $this->compositeExpression->getType();
}
@@ -87,7 +87,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
*
* @return string
*/
- public function __toString() {
+ public function __toString(): string {
return (string) $this->compositeExpression;
}
}
diff --git a/lib/public/DB/QueryBuilder/ICompositeExpression.php b/lib/public/DB/QueryBuilder/ICompositeExpression.php
index 905465ba9e0..c50dedf1797 100644
--- a/lib/public/DB/QueryBuilder/ICompositeExpression.php
+++ b/lib/public/DB/QueryBuilder/ICompositeExpression.php
@@ -37,7 +37,7 @@ interface ICompositeExpression {
* @return ICompositeExpression
* @since 8.2.0
*/
- public function addMultiple(array $parts = []);
+ public function addMultiple(array $parts = []): ICompositeExpression;
/**
* Adds an expression to composite expression.
@@ -47,7 +47,7 @@ interface ICompositeExpression {
* @return ICompositeExpression
* @since 8.2.0
*/
- public function add($part);
+ public function add($part): ICompositeExpression;
/**
* Retrieves the amount of expressions on composite expression.
@@ -55,7 +55,7 @@ interface ICompositeExpression {
* @return integer
* @since 8.2.0
*/
- public function count();
+ public function count(): int;
/**
* Returns the type of this composite expression (AND/OR).
@@ -63,5 +63,5 @@ interface ICompositeExpression {
* @return string
* @since 8.2.0
*/
- public function getType();
+ public function getType(): string;
}