src/Builder/Syntax/SelectWriter.php
protected function writeSelectAggrupation(Select $select, $writer, $getMethod, $writeMethod, $glue, $prepend = '')
    {
        $str = '';
        $joins = $select->$getMethod();

        if (!empty($joins)) {
            \array_walk(
                $joins,
                function (&$join) use ($writer, $writeMethod) {
                    $join = $writer->$writeMethod($join);
                }
            );

            $str = $prepend.implode($glue, $joins);
        }

        return $str;
    }
protected function writeSelectAggrupation(Select $select, $writer, $getMethod, $writeMethod, $glue, $prepend = '')
    {
        $str = '';
        $joins = $select->$getMethod();

        if (!empty($joins)) {
            \array_walk(
                $joins,
                function (&$join) use ($writer, $writeMethod) {
                    $join = $writer->$writeMethod($join);
                }
            );

            $str = $prepend.implode($glue, $joins);
        }

        return $str;
    }
@param Select $select
@param        $writer
@param string $getMethod
@param string $writeMethod
@param string $glue
@param string $prepend

@return string