src/Builder/Syntax/SelectWriter.php
protected function writeSelectOrderBy(Select $select, array &$parts)
    {
        $str = '';
        if (\count($select->getAllOrderBy())) {
            $orderByArray = $select->getAllOrderBy();
            \array_walk(
                $orderByArray,
                function (&$orderBy) {
                    $orderBy = $this->writeOrderBy($orderBy);
                }
            );

            $str = 'ORDER BY ';
            $str .= \implode(', ', $orderByArray);
        }

        $parts = \array_merge($parts, [$str]);

        return $this;
    }
protected function writeSelectOrderBy(Select $select, array &$parts)
    {
        $str = '';
        if (\count($select->getAllOrderBy())) {
            $orderByArray = $select->getAllOrderBy();
            \array_walk(
                $orderByArray,
                function (&$orderBy) {
                    $orderBy = $this->writeOrderBy($orderBy);
                }
            );

            $str = 'ORDER BY ';
            $str .= \implode(', ', $orderByArray);
        }

        $parts = \array_merge($parts, [$str]);

        return $this;
    }
@param Select $select
@param array  $parts

@return $this