protected function compileOrderPart(Query $query, array &$bindings): string
    {
        $ordersSQL = [];

        foreach ($query->order as $order) {
            $orderSQL = $this->compileOneOrder($order, $bindings);

            if ($orderSQL !== '') {
                $ordersSQL[] = $orderSQL;
            }
        }

        return $ordersSQL ? 'ORDER BY '.implode(', ', $ordersSQL) : '';
    }
protected function compileOrderPart(Query $query, array &$bindings): string
    {
        $ordersSQL = [];

        foreach ($query->order as $order) {
            $orderSQL = $this->compileOneOrder($order, $bindings);

            if ($orderSQL !== '') {
                $ordersSQL[] = $orderSQL;
            }
        }

        return $ordersSQL ? 'ORDER BY '.implode(', ', $ordersSQL) : '';
    }
protected function compileOrderPart ( Query $ query , array & $ bindings ) : string { $ ordersSQL = [ ] ; foreach ( $ query -> order as $ order ) { $ orderSQL = $ this -> compileOneOrder ( $ order , $ bindings ) ; if ( $ orderSQL !== '' ) { $ ordersSQL [ ] = $ orderSQL ; } } return $ ordersSQL ? 'ORDER BY ' . implode ( ', ' , $ ordersSQL ) : '' ; }
Compiles a ORDER part of an SQL query.

@param Query $query Query data
@param array $bindings Bound values (array is filled by link)
@return string SQL text
@throws InvalidQueryException
Compiles a ORDER part of an SQL query .