Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Predicate extends Expression implements ValueInterface |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Logical `AND` |
||
13 | * |
||
14 | * `($this AND ...)` |
||
15 | * |
||
16 | * @param string ...$predicates |
||
17 | * @return Predicate |
||
18 | */ |
||
19 | public function lAnd(string ...$predicates) |
||
20 | { |
||
21 | array_unshift($predicates, $this); |
||
22 | return static::factory($this->db, sprintf('(%s)', implode(' AND ', $predicates))); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Logical `NOT` |
||
27 | * |
||
28 | * `NOT($this)` |
||
29 | * |
||
30 | * @return static |
||
31 | */ |
||
32 | public function lNot() |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Logical `OR` |
||
39 | * |
||
40 | * `($this OR ...)` |
||
41 | * |
||
42 | * @param string ...$predicates |
||
43 | * @return Predicate |
||
44 | */ |
||
45 | public function lOr(string ...$predicates) |
||
52 |