original_string: public function set_attributes($type, $precision=null, $unsigned=null, $notnull=null, $sequence=null, $default=null, $previous=null) {
          $this->type = $type;
      /// Try to split the precision into length and decimals and apply
      /// each one as needed
          $precisionarr = explode(',', $precision);
          if (isset($precisionarr[0])) {
              $this->length = trim($precisionarr[0]);
          }
          if (isset($precisionarr[1])) {
              $this->decimals = trim($precisionarr[1]);
          }
          $this->precision = $type;
          $this->notnull = !empty($notnull) ? true : false;
          $this->sequence = !empty($sequence) ? true : false;
          $this->setDefault($default);
  
          if ($this->type == XMLDB_TYPE_BINARY || $this->type == XMLDB_TYPE_TEXT) {
              $this->length = null;
              $this->decimals = null;
          }
  
          $this->previous = $previous;
      }
code: public function set_attributes($type, $precision=null, $unsigned=null, $notnull=null, $sequence=null, $default=null, $previous=null) {
          $this->type = $type;
      /// Try to split the precision into length and decimals and apply
      /// each one as needed
          $precisionarr = explode(',', $precision);
          if (isset($precisionarr[0])) {
              $this->length = trim($precisionarr[0]);
          }
          if (isset($precisionarr[1])) {
              $this->decimals = trim($precisionarr[1]);
          }
          $this->precision = $type;
          $this->notnull = !empty($notnull) ? true : false;
          $this->sequence = !empty($sequence) ? true : false;
          $this->setDefault($default);
  
          if ($this->type == XMLDB_TYPE_BINARY || $this->type == XMLDB_TYPE_TEXT) {
              $this->length = null;
              $this->decimals = null;
          }
  
          $this->previous = $previous;
      }
code_tokens: public function set_attributes ( $ type , $ precision = null , $ unsigned = null , $ notnull = null , $ sequence = null , $ default = null , $ previous = null ) { $ this -> type = $ type ; /// Try to split the precision into length and decimals and apply /// each one as needed $ precisionarr = explode ( ',' , $ precision ) ; if ( isset ( $ precisionarr [ 0 ] ) ) { $ this -> length = trim ( $ precisionarr [ 0 ] ) ; } if ( isset ( $ precisionarr [ 1 ] ) ) { $ this -> decimals = trim ( $ precisionarr [ 1 ] ) ; } $ this -> precision = $ type ; $ this -> notnull = ! empty ( $ notnull ) ? true : false ; $ this -> sequence = ! empty ( $ sequence ) ? true : false ; $ this -> setDefault ( $ default ) ; if ( $ this -> type == XMLDB_TYPE_BINARY || $ this -> type == XMLDB_TYPE_TEXT ) { $ this -> length = null ; $ this -> decimals = null ; } $ this -> previous = $ previous ; }
docstring: Set all the attributes of one xmldb_field
  
  @param int $type XMLDB_TYPE_INTEGER, XMLDB_TYPE_NUMBER, XMLDB_TYPE_CHAR, XMLDB_TYPE_TEXT, XMLDB_TYPE_BINARY
  @param string $precision length for integers and chars, two-comma separated numbers for numbers
  @param bool $unsigned XMLDB_UNSIGNED or null (or false)
  @param bool $notnull XMLDB_NOTNULL or null (or false)
  @param bool $sequence XMLDB_SEQUENCE or null (or false)
  @param mixed $default meaningful default o null (or false)
  @param xmldb_object $previous
docstring_tokens: Set all the attributes of one xmldb_field