| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait WhereBuilder { |
||
| 14 | use AbstractDB; |
||
| 15 | |||
| 16 | /** @var array<int, array{DBWhereExpressionType, list<DBParameterValueType>}> */ |
||
|
|
|||
| 17 | private array $where = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param DBWhereExpressionType $expression |
||
| 21 | * @param DBParameterValueType ...$args |
||
| 22 | * @return $this |
||
| 23 | */ |
||
| 24 | public function where($expression, ...$args) { |
||
| 25 | /** @var Closure(DBWhereExpressionType, list<DBParameterValueType>):void $fn */ |
||
| 26 | $fn = fn($expression, $args) => $this->where[] = [$expression, $args]; |
||
| 27 | ConditionAddHelper::addCondition($fn, $expression, $args); |
||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $query |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | protected function buildWhereConditions(string $query): string { |
||
| 37 | } |
||
| 38 | } |
||
| 39 |