private static function validateName(string $name) : string
  {
    if (empty($name) || preg_match("/[=,; \t\r\n\013\014]/", $name)) {
      throw new \InvalidArgumentException(sprintf('Invalid name \'%s\'.', $name));
    }

    return $name;
  }