original_string: protected function buildOrderBy()
      {
          if (count($this->orderBy) === 0) {
              return '';
          }
  
          $orders = [];
          foreach ($this->orderBy as $orderBy) {
              $key = $this->quoteIdentifier($orderBy['tableName']) . '.' . $this->quoteIdentifier($orderBy['key']);
              $orders[] = $key . ' ' . $orderBy['direction'];
          }
          return 'ORDER BY ' . implode(', ', $orders);
      }
code: protected function buildOrderBy()
      {
          if (count($this->orderBy) === 0) {
              return '';
          }
  
          $orders = [];
          foreach ($this->orderBy as $orderBy) {
              $key = $this->quoteIdentifier($orderBy['tableName']) . '.' . $this->quoteIdentifier($orderBy['key']);
              $orders[] = $key . ' ' . $orderBy['direction'];
          }
          return 'ORDER BY ' . implode(', ', $orders);
      }
code_tokens: protected function buildOrderBy ( ) { if ( count ( $ this -> orderBy ) === 0 ) { return '' ; } $ orders = [ ] ; foreach ( $ this -> orderBy as $ orderBy ) { $ key = $ this -> quoteIdentifier ( $ orderBy [ 'tableName' ] ) . '.' . $ this -> quoteIdentifier ( $ orderBy [ 'key' ] ) ; $ orders [ ] = $ key . ' ' . $ orderBy [ 'direction' ] ; } return 'ORDER BY ' . implode ( ', ' , $ orders ) ; }
docstring: Build and return the order by string.
  
  @return string
docstring_tokens: Build and return the order by string .