| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class GroupKeyword implements Component |
||
| 15 | { |
||
| 16 | /** @var 'ASC'|'DESC'|null */ |
||
|
|
|||
| 17 | public string|null $type = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The expression that is used for grouping. |
||
| 21 | */ |
||
| 22 | public Expression|null $expr = null; |
||
| 23 | |||
| 24 | /** @param Expression|null $expr the expression that we are sorting by */ |
||
| 25 | 38 | public function __construct(Expression|null $expr = null) |
|
| 26 | { |
||
| 27 | 38 | $this->expr = $expr; |
|
| 28 | } |
||
| 29 | |||
| 30 | 36 | public function build(): string |
|
| 31 | { |
||
| 32 | 36 | return trim((string) $this->expr); |
|
| 33 | } |
||
| 34 | |||
| 35 | 30 | public function __toString(): string |
|
| 38 | } |
||
| 39 | } |
||
| 40 |