CommandArgumentList::addOption allowed without value (= true)

master 3.10.0
Julien Rosset 2 months ago
parent b3d82fff86
commit 1d4075240e

@ -60,7 +60,7 @@ class CommandArgumentList {
* *
* @return $this * @return $this
*/ */
public function addOption (string $name, mixed $value): static { public function addOption (string $name, mixed $value = true): static {
$this->arguments[(str_starts_with($name, '-') ? '' : '--') . $name] = $value; $this->arguments[(str_starts_with($name, '-') ? '' : '--') . $name] = $value;
return $this; return $this;
} }

Loading…
Cancel
Save