public function __construct($name)
{
if (!is_int($name) && empty($name)) {
throw new \Exception(sprintf('Invalid option name %s: Must be identified by a single character or an integer', $name));
}
if (!is_int($name)) {
$this->type = mb_strlen($name, 'UTF-8') === 1 ? self::TYPE_SHORT : self::TYPE_VERBOSE;
} else {
$this->type = self::TYPE_ANONYMOUS;
}
$this->name = $name;
}