original_string: public static function normalize_component($component) {
          if ($component === 'moodle' or $component === 'core' or $component === '') {
              return array('core', null);
          }
  
          if (strpos($component, '_') === false) {
              self::init();
              if (array_key_exists($component, self::$subsystems)) {
                  $type   = 'core';
                  $plugin = $component;
              } else {
                  // Everything else without underscore is a module.
                  $type   = 'mod';
                  $plugin = $component;
              }
  
          } else {
              list($type, $plugin) = explode('_', $component, 2);
              if ($type === 'moodle') {
                  $type = 'core';
              }
              // Any unknown type must be a subplugin.
          }
  
          return array($type, $plugin);
      }
code: public static function normalize_component($component) {
          if ($component === 'moodle' or $component === 'core' or $component === '') {
              return array('core', null);
          }
  
          if (strpos($component, '_') === false) {
              self::init();
              if (array_key_exists($component, self::$subsystems)) {
                  $type   = 'core';
                  $plugin = $component;
              } else {
                  // Everything else without underscore is a module.
                  $type   = 'mod';
                  $plugin = $component;
              }
  
          } else {
              list($type, $plugin) = explode('_', $component, 2);
              if ($type === 'moodle') {
                  $type = 'core';
              }
              // Any unknown type must be a subplugin.
          }
  
          return array($type, $plugin);
      }
code_tokens: public static function normalize_component ( $ component ) { if ( $ component === 'moodle' or $ component === 'core' or $ component === '' ) { return array ( 'core' , null ) ; } if ( strpos ( $ component , '_' ) === false ) { self :: init ( ) ; if ( array_key_exists ( $ component , self :: $ subsystems ) ) { $ type = 'core' ; $ plugin = $ component ; } else { // Everything else without underscore is a module. $ type = 'mod' ; $ plugin = $ component ; } } else { list ( $ type , $ plugin ) = explode ( '_' , $ component , 2 ) ; if ( $ type === 'moodle' ) { $ type = 'core' ; } // Any unknown type must be a subplugin. } return array ( $ type , $ plugin ) ; }
docstring: Normalize the component name using the "frankenstyle" rules.
  
  Note: this does not verify the validity of plugin or type names.
  
  @param string $component
  @return array two-items list of [(string)type, (string|null)name]
docstring_tokens: Normalize the component name using the frankenstyle rules .