From 1d4075240e74826fde49941895885ffdacf40fbd Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Wed, 14 May 2025 11:45:58 +0200 Subject: [PATCH] CommandArgumentList::addOption allowed without value (= true) --- src/CliProgram/CommandCall/CommandArgumentList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CliProgram/CommandCall/CommandArgumentList.php b/src/CliProgram/CommandCall/CommandArgumentList.php index 59e071c..e980863 100644 --- a/src/CliProgram/CommandCall/CommandArgumentList.php +++ b/src/CliProgram/CommandCall/CommandArgumentList.php @@ -60,7 +60,7 @@ class CommandArgumentList { * * @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; return $this; }