/**
* @var string[]
*/
- private $orderings = array();
+ private $orderings = [];
/**
* @var int|null
return $this->where($expression);
}
- $this->expression = new CompositeExpression(CompositeExpression::TYPE_AND, array(
- $this->expression, $expression
- ));
+ $this->expression = new CompositeExpression(
+ CompositeExpression::TYPE_AND,
+ [$this->expression, $expression]
+ );
return $this;
}
return $this->where($expression);
}
- $this->expression = new CompositeExpression(CompositeExpression::TYPE_OR, array(
- $this->expression, $expression
- ));
+ $this->expression = new CompositeExpression(
+ CompositeExpression::TYPE_OR,
+ [$this->expression, $expression]
+ );
return $this;
}
public function orderBy(array $orderings)
{
$this->orderings = array_map(
- function ($ordering) {
+ function (string $ordering) : string {
return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC;
},
$orderings