original_string: public static function getType($type)
      {
          if (!isset(self::$typesMap[$type])) {
              throw new \InvalidArgumentException(sprintf('Invalid type specified "%s".', $type));
          }
          if (!isset(self::$typeObjects[$type])) {
              $className                = self::$typesMap[$type];
              self::$typeObjects[$type] = new $className;
          }
  
          return self::$typeObjects[$type];
      }
code: public static function getType($type)
      {
          if (!isset(self::$typesMap[$type])) {
              throw new \InvalidArgumentException(sprintf('Invalid type specified "%s".', $type));
          }
          if (!isset(self::$typeObjects[$type])) {
              $className                = self::$typesMap[$type];
              self::$typeObjects[$type] = new $className;
          }
  
          return self::$typeObjects[$type];
      }
code_tokens: public static function getType ( $ type ) { if ( ! isset ( self :: $ typesMap [ $ type ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid type specified "%s".' , $ type ) ) ; } if ( ! isset ( self :: $ typeObjects [ $ type ] ) ) { $ className = self :: $ typesMap [ $ type ] ; self :: $ typeObjects [ $ type ] = new $ className ; } return self :: $ typeObjects [ $ type ] ; }
docstring: Get a Type instance.
  
  @param string $type The type name.
  
  @return Type $type
  
  @throws \InvalidArgumentException
docstring_tokens: Get a Type instance .