original_string: public static function size_for_name($sizename) {
          for ($size = self::MIN_SIZE; $size <= self::MAX_SIZE; $size++) {
              if ($sizename == get_string('shortsize_' . $size, 'tool_generator')) {
                  return $size;
              }
          }
          throw new coding_exception("Unknown size name '$sizename'");
      }
code: public static function size_for_name($sizename) {
          for ($size = self::MIN_SIZE; $size <= self::MAX_SIZE; $size++) {
              if ($sizename == get_string('shortsize_' . $size, 'tool_generator')) {
                  return $size;
              }
          }
          throw new coding_exception("Unknown size name '$sizename'");
      }
code_tokens: public static function size_for_name ( $ sizename ) { for ( $ size = self :: MIN_SIZE ; $ size <= self :: MAX_SIZE ; $ size ++ ) { if ( $ sizename == get_string ( 'shortsize_' . $ size , 'tool_generator' ) ) { return $ size ; } } throw new coding_exception ( "Unknown size name '$sizename'" ) ; }
docstring: Converts a size name into the numeric constant.
  
  @param string $sizename Size name e.g. 'L'
  @return int Numeric version
  @throws coding_exception If the size name is not known
docstring_tokens: Converts a size name into the numeric constant .