You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the user to specify one or more options that conflict with each other. For example, a script may have a verbose option and a quiet option. A user providing both of these options would be in conflict.
/**
* @var CLIHelper\Helper $option
*/
// Working directly with option
$option->addOptionConflict($option)
// Working CLIHelper\OptionBuilder using the CLIHelper\Helper
$helper->newOption()
->withName("verbose")
->withLong("verbose")
->withShort("v")
->withConflict($option)
->build()
// Adding multiple conflicts using CLIHelper\Helper
$helper->newOption()
->withName("verbose")
->withLong("verbose")
->withShort("v")
->withConflicts(array($option1, $option2))
->build()
The user should only have to tell one option that it conflicts with another. The helper should take care of making sure both options know they have a conflict with the other.
The text was updated successfully, but these errors were encountered:
Allow the user to specify one or more options that conflict with each other. For example, a script may have a verbose option and a quiet option. A user providing both of these options would be in conflict.
The user should only have to tell one option that it conflicts with another. The helper should take care of making sure both options know they have a conflict with the other.
The text was updated successfully, but these errors were encountered: