This commit is contained in:
mcndave committed 2021-01-26 16:59:29 +00:00
commit 8f9332fbad
8 files changed
+131 -36

No files matched your search

+5 -7
View File
@@ -11,8 +11,10 @@ class Where implements \Ulmus\Annotation\Annotation {
public $value;
public string $operator;
public string $condition;
public function __construct(/* stringable */ $field = null, $value = null, ? string $operator = null)
public function __construct(? string $field = null, $value = null, ? string $operator = null, ? string $condition = null)
{
if ( $field !== null ) {
$this->field = $field;
@@ -22,11 +24,7 @@ class Where implements \Ulmus\Annotation\Annotation {
$this->value = $value;
}
if ( $operator !== null ) {
$this->operator = $operator;
}
else {
$this->operator = Query\Where::OPERATOR_EQUAL;
}
$this->operator = $operator !== null ? $operator : Query\Where::OPERATOR_EQUAL;
$this->condition = $condition !== null ? $condition : Query\Where::CONDITION_AND;
}
}