Type CompositeExpression and ICompositeExpression

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-03-04 21:47:44 +01:00
parent b0fe408d1f
commit d7f7d3bc51
2 changed files with 9 additions and 9 deletions

View File

@ -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;
}
}

View File

@ -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;
}