original_string: public function getXMLDBKeyType($type) {
  
          $result = XMLDB_KEY_INCORRECT;
  
          switch (strtolower($type)) {
              case 'primary':
                  $result = XMLDB_KEY_PRIMARY;
                  break;
              case 'unique':
                  $result = XMLDB_KEY_UNIQUE;
                  break;
              case 'foreign':
                  $result = XMLDB_KEY_FOREIGN;
                  break;
              case 'foreign-unique':
                  $result = XMLDB_KEY_FOREIGN_UNIQUE;
                  break;
              // case 'check':  //Not supported
              //     $result = XMLDB_KEY_CHECK;
              //     break;
          }
          // Return the normalized XMLDB_KEY
          return $result;
      }
code: public function getXMLDBKeyType($type) {
  
          $result = XMLDB_KEY_INCORRECT;
  
          switch (strtolower($type)) {
              case 'primary':
                  $result = XMLDB_KEY_PRIMARY;
                  break;
              case 'unique':
                  $result = XMLDB_KEY_UNIQUE;
                  break;
              case 'foreign':
                  $result = XMLDB_KEY_FOREIGN;
                  break;
              case 'foreign-unique':
                  $result = XMLDB_KEY_FOREIGN_UNIQUE;
                  break;
              // case 'check':  //Not supported
              //     $result = XMLDB_KEY_CHECK;
              //     break;
          }
          // Return the normalized XMLDB_KEY
          return $result;
      }
code_tokens: public function getXMLDBKeyType ( $ type ) { $ result = XMLDB_KEY_INCORRECT ; switch ( strtolower ( $ type ) ) { case 'primary' : $ result = XMLDB_KEY_PRIMARY ; break ; case 'unique' : $ result = XMLDB_KEY_UNIQUE ; break ; case 'foreign' : $ result = XMLDB_KEY_FOREIGN ; break ; case 'foreign-unique' : $ result = XMLDB_KEY_FOREIGN_UNIQUE ; break ; // case 'check':  //Not supported //     $result = XMLDB_KEY_CHECK; //     break; } // Return the normalized XMLDB_KEY return $ result ; }
docstring: This function returns the correct XMLDB_KEY_XXX value for the
  string passed as argument
  @param string $type
  @return int
docstring_tokens: This function returns the correct XMLDB_KEY_XXX value for the string passed as argument