Merge branch 'master' of https://git.mcnd.ca/mcndave/ulmus
This commit is contained in:
commit
8f9332fbad
8 files changed
+131
-36
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user