groupBy = $order; return $this; } public function add(string $field, ? string $direction = null) : self { $this->groupBy[] = $field; return $this; } public function render() : string { return $this->renderSegments([ static::SQL_TOKEN, implode(", ", $this->groupBy) ]); } }