original_string: protected function _renderLimitoffset($sql)
      {
          $count = 0;
          $offset = 0;
  
          if (!empty($this->_parts[self::LIMIT_OFFSET])) {
              $offset = (int) $this->_parts[self::LIMIT_OFFSET];
              $count = PHP_INT_MAX;
          }
  
          if (!empty($this->_parts[self::LIMIT_COUNT])) {
              $count = (int) $this->_parts[self::LIMIT_COUNT];
          }
  
          /*
           * Add limits clause
           */
          if ($count > 0) {
              $sql = trim($this->_adapter->limit($sql, $count, $offset));
          }
  
          return $sql;
      }
code: protected function _renderLimitoffset($sql)
      {
          $count = 0;
          $offset = 0;
  
          if (!empty($this->_parts[self::LIMIT_OFFSET])) {
              $offset = (int) $this->_parts[self::LIMIT_OFFSET];
              $count = PHP_INT_MAX;
          }
  
          if (!empty($this->_parts[self::LIMIT_COUNT])) {
              $count = (int) $this->_parts[self::LIMIT_COUNT];
          }
  
          /*
           * Add limits clause
           */
          if ($count > 0) {
              $sql = trim($this->_adapter->limit($sql, $count, $offset));
          }
  
          return $sql;
      }
code_tokens: protected function _renderLimitoffset ( $ sql ) { $ count = 0 ; $ offset = 0 ; if ( ! empty ( $ this -> _parts [ self :: LIMIT_OFFSET ] ) ) { $ offset = ( int ) $ this -> _parts [ self :: LIMIT_OFFSET ] ; $ count = PHP_INT_MAX ; } if ( ! empty ( $ this -> _parts [ self :: LIMIT_COUNT ] ) ) { $ count = ( int ) $ this -> _parts [ self :: LIMIT_COUNT ] ; } /*
           * Add limits clause
           */ if ( $ count > 0 ) { $ sql = trim ( $ this -> _adapter -> limit ( $ sql , $ count , $ offset ) ) ; } return $ sql ; }
docstring: Render LIMIT OFFSET clause
  
  @param string   $sql SQL query
  @return string
docstring_tokens: Render LIMIT OFFSET clause