original_string: final public static function fromName(string $name): Enum
      {
          $constName = sprintf('%s::%s', static::class, $name);
  
          if (!defined($constName)) {
              $message = sprintf('%s is not a member constant of enum %s', $name, static::class);
              throw new DomainException($message);
          }
  
          return new static(constant($constName));
      }
code: final public static function fromName(string $name): Enum
      {
          $constName = sprintf('%s::%s', static::class, $name);
  
          if (!defined($constName)) {
              $message = sprintf('%s is not a member constant of enum %s', $name, static::class);
              throw new DomainException($message);
          }
  
          return new static(constant($constName));
      }
code_tokens: final public static function fromName ( string $ name ) : Enum { $ constName = sprintf ( '%s::%s' , static :: class , $ name ) ; if ( ! defined ( $ constName ) ) { $ message = sprintf ( '%s is not a member constant of enum %s' , $ name , static :: class ) ; throw new DomainException ( $ message ) ; } return new static ( constant ( $ constName ) ) ; }
docstring: Creates instance from an enum constant name
  
  @param string $name The enum constant name
  
  @return Enum
  
  @throws DomainException When the name is invalid
docstring_tokens: Creates instance from an enum constant name