Build no value option rule
ex) --hoge_option

@param string $name
@param string $description
@return array
548512
public function optionModeNoValue($name, $description)
    {
        $shortcut = null;
        $mode = InputOption::VALUE_NONE;
        return [$name, $shortcut, $mode, $description, $defaultValue = null];
    }
709141
protected function addOptionInput($name, $requirement = null, $description = '', $value = null)
    {
        $this->inputs[] = new Option($name, $requirement, $description, $value);
    }
297969
public static function create($name, $type, $description = null)
    {
        $result = new static();
        $result->name = $name;
        $result->type = $type;
        $result->description = $description;

        return $result;
    }
1313404
public function withOption($name, $description, $default = '', array $choices = [])
    {
        $this->choices[$name] = $choices;

        return $this->addOption($name, null, InputOption::VALUE_OPTIONAL, $description, $default);
    }
1060804
public function setRole($name, $description = null)
    {
        $role = $this->getRole($name) ?: $this->createRole($name);
        if ($description) {
            $role->description = $description;
        }
        $this->add($role);

        return $role;
    }
529983
public function actionSet ($name, $value, $description = null)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}
			else
			{
				$object->value = $value;
				if (!is_null($description))
					$object->description = $description;
			}
			$object->save();
			$this->actionList();
		}
755515
public function checkWithValue($name, $value)
    {
        /** @var \Behat\Mink\Element\NodeElement $nodeElement */
        $nodeElement = $this->getSession()->getPage()->find(
            'xpath',
            sprintf(
                '//input[@type="checkbox" and @name="%s" and @value="%s"]',
                $name,
                $value
            )
        );

        if (null === $nodeElement) {
            // Yikes! It aint where we want it
            throw new ExpectationException(
                sprintf(
                    'A checkbox with the value "%s" is not in the page.',
                    $value
                ),
                $this->getSession()->getDriver()
            );
        }

        // Make the magic happen
        $nodeElement->check();
    }
548382
public function create($name, $description, $code)
	{
		$this->userId = $this->getEntityProvider()->getMe()->getId();
		$this->command = $name;
		$this->description = $description;
		$this->code = $code;
		$this->getLogger()->info('Creating new display command ' . $name);
		$response = $this->doPost('/command', $this->toArray());

		return $this->hydrate($response);
	}
485375
public static function text($name, $value = '', array $htmlOptions = [])
    {
    	return self::input('text', $name, $value) . self::htmlOptions($htmlOptions) .'>';
    }
565579
public function addCommand(
        string $name,
        string $description,
        array $operands = null,
        array $options = null,
        array $parameters = null
    ): ShellBuilder {
        $definition = new Definition();
        foreach ($operands ?? [] as $operand) {
            $definition->addOperand(
                new Operand($operand['name'])
            );
        }

        foreach ($options ?? [] as $option) {
            $definition->addOption(
                new Option(
                    $option['name'],
                    $option['description'],
                    $option['short'] ?? null,
                    $option['long'] ?? null,
                    $option['flag'] ?? null,
                    $option['multiple'] ?? null
                )
            );
        }

        $this->commands[] = new Command(
            $name,
            $description,
            $definition,
            $parameters
        );

        return $this;
    }
661648
protected function getRawOptionValue($name, $value)
    {
        $modelVariable = $this->getSingularVariable($this->modelName);
        $valueString = is_null($value) || $value == 'null' ? 'null' : sprintf("'%s'", $value);
        $accessor = $this->getDefaultValueAccessor($modelVariable, $name, $valueString);
        return sprintf("old('%s', %s)", $name, $accessor);
    }
21997
public function optionModeRequired($name, $description, $defaultValue = null)
    {
        $shortcut = null;
        $mode = InputOption::VALUE_REQUIRED;
        return [$name, $shortcut, $mode, $description, $defaultValue];
    }
113373
public function __empty($name) {
        if (method_exists($this, 'get_'.$name) ||
                property_exists($this, '_'.$name) ||
                array_key_exists($name, self::$sectionformatoptions[$this->modinfo->get_course()->format])) {
            $value = $this->__get($name);
            return empty($value);
        }
        return true;
    }
809708
public function arg($name, $description, $required = false) {
        $this->currentSchema[Cli::META][Cli::ARGS][$name] =
            ['description' => $description, 'required' => $required];
        return $this;
    }
369119
public static function select($name, $options, $attributes = array())
    {
        // Extract the value
        $value = isset($attributes['value']) ? $attributes['value'] : null;
        unset($attributes['value']);

        // Set the name
        $attributes['name'] = $name;

        // Set the id to the name if one
        // is not already set.
        if (!isset($attributes['id'])) {
            $attributes['id'] = $name;
        }

        // Opening tag
        $select = array();
        $select[] = "<select " . HTML::buildAttributes($attributes) . ">";

        // Options
        foreach ($options as $index => $option) {
            if (!is_numeric($index)) {
                $select[] = '<optgroup label="' . $index . '">';
                foreach ($option as $opt) {
                    $select[] = static::selectOption($opt, $value);
                }
                $select[] = '</optgroup>';
            } else {
                $select[] = static::selectOption($option, $value);
            }
        }

        // Closing tags
        $select[] = '</select>';

        return implode(PHP_EOL, $select);
    }
1008667
public function update( string $name, $value ) {
		if ( get_field( $name, 'option') ) {
			return update_field( $name, $value, 'option');
		} elseif ( get_option( $name ) ) {
			return update_option( $name, $value );
		}
		
		return FALSE;
	}
1351927
public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }