original_string: public static function normalize($rawtags, $tolowercase = true) {
          $result = array();
          foreach ($rawtags as $rawtag) {
              $rawtag = trim($rawtag);
              if (strval($rawtag) !== '') {
                  $clean = clean_param($rawtag, PARAM_TAG);
                  if ($tolowercase) {
                      $result[$rawtag] = core_text::strtolower($clean);
                  } else {
                      $result[$rawtag] = $clean;
                  }
              }
          }
          return $result;
      }
code: public static function normalize($rawtags, $tolowercase = true) {
          $result = array();
          foreach ($rawtags as $rawtag) {
              $rawtag = trim($rawtag);
              if (strval($rawtag) !== '') {
                  $clean = clean_param($rawtag, PARAM_TAG);
                  if ($tolowercase) {
                      $result[$rawtag] = core_text::strtolower($clean);
                  } else {
                      $result[$rawtag] = $clean;
                  }
              }
          }
          return $result;
      }
code_tokens: public static function normalize ( $ rawtags , $ tolowercase = true ) { $ result = array ( ) ; foreach ( $ rawtags as $ rawtag ) { $ rawtag = trim ( $ rawtag ) ; if ( strval ( $ rawtag ) !== '' ) { $ clean = clean_param ( $ rawtag , PARAM_TAG ) ; if ( $ tolowercase ) { $ result [ $ rawtag ] = core_text :: strtolower ( $ clean ) ; } else { $ result [ $ rawtag ] = $ clean ; } } } return $ result ; }
docstring: Function that normalizes a list of tag names.
  
  @param   array        $rawtags array of tags
  @param   bool         $tolowercase convert to lower case?
  @return  array        lowercased normalized tags, indexed by the normalized tag, in the same order as the original array.
  (Eg: 'Banana' => 'banana').
docstring_tokens: Function that normalizes a list of tag names .