protected function prepareOrderBy(): string
    {
        if (empty($this->orderBy)) {
            return '';
        }
        $orders = [];
        foreach ($this->orderBy as $column => $order) {
            $orders[] = $column . ' ' . $order;
        }
        return ' ORDER BY ' . implode(', ', $orders);
    }
protected function prepareOrderBy(): string
    {
        if (empty($this->orderBy)) {
            return '';
        }
        $orders = [];
        foreach ($this->orderBy as $column => $order) {
            $orders[] = $column . ' ' . $order;
        }
        return ' ORDER BY ' . implode(', ', $orders);
    }
protected function prepareOrderBy ( ) : string { if ( empty ( $ this -> orderBy ) ) { return '' ; } $ orders = [ ] ; foreach ( $ this -> orderBy as $ column => $ order ) { $ orders [ ] = $ column . ' ' . $ order ; } return ' ORDER BY ' . implode ( ', ' , $ orders ) ; }
Prepare string to apply it inside SQL query

@return string
Prepare string to apply it inside SQL query