Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | trait HavingBuilder { |
||
14 | use AbstractDB; |
||
15 | |||
16 | /** @var array<int, array{DBWhereExpressionType, DBParameterValueType[]}> */ |
||
|
|||
17 | private array $having = []; |
||
18 | |||
19 | /** |
||
20 | * @param DBWhereExpressionType $expression |
||
21 | * @param DBParameterValueType ...$args |
||
22 | * @return $this |
||
23 | */ |
||
24 | public function having($expression, ...$args) { |
||
25 | /** @var Closure(DBWhereExpressionType, list<DBParameterValueType>):void $fn */ |
||
26 | $fn = fn($expression, $args) => $this->having[] = [$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 buildHavingConditions(string $query): string { |
||
37 | } |
||
38 | } |
||
39 |