| Total Complexity | 6 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | trait Operators |
||
| 6 | { |
||
| 7 | private $operators = ''; |
||
| 8 | private $attributes = []; |
||
| 9 | |||
| 10 | 2 | public function and(string $key = null, $value): self |
|
| 11 | { |
||
| 12 | 2 | return (!$key) ? $this : $this->operator('AND', $key, $value); |
|
| 13 | } |
||
| 14 | |||
| 15 | 2 | public function or(string $key = null, $value): self |
|
| 16 | { |
||
| 17 | 2 | return (!$key) ? $this : $this->operator('OR', $key, $value); |
|
| 18 | } |
||
| 19 | |||
| 20 | 2 | public function not(string $key, $value): self |
|
| 23 | } |
||
| 24 | |||
| 25 | 6 | private function operator(string $operator, string $key, $value): self |
|
| 30 | } |
||
| 31 | } |
||
| 32 |