function InputArgument::__construct
Same name in this branch
- 11.1.x vendor/symfony/console/Input/InputArgument.php \Symfony\Component\Console\Input\InputArgument::__construct()
Parameters
string $name The argument name:
int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL:
string $description A description text:
string|bool|int|float|string[]|null $default The default value (for self::OPTIONAL mode only):
list<string>|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion:
Throws
InvalidArgumentException When argument mode is not valid
Overrides InputArgument::__construct
File
-
vendor/
composer/ composer/ src/ Composer/ Console/ Input/ InputArgument.php, line 47
Class
- InputArgument
- Backport suggested values definition from symfony/console 6.1+
Namespace
Composer\Console\InputCode
public function __construct(string $name, ?int $mode = null, string $description = '', $default = null, $suggestedValues = []) {
parent::__construct($name, $mode, $description, $default);
$this->suggestedValues = $suggestedValues;
}