Skip to content

Commit aee3e18

Browse files
committed
Allow to disable full named option, provide emty value separator and fix type
1 parent 8e96203 commit aee3e18

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Version10/Definition/Builder/ConsoleApplicationBuilderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface ConsoleApplicationBuilderInterface
1919
public function withDescription(string $description): self;
2020

2121
/**
22-
* Describe which value separator is uesed.
22+
* Describe which value separator is used.
2323
*
2424
* If not defined, PHPCQ assumes that an equal sign is used.
2525
*

src/Version10/Definition/Builder/ConsoleOptionBuilderInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ interface ConsoleOptionBuilderInterface
1313

1414
public const VALUE_SEPARATOR_EQUAL_SIGN = '=';
1515

16+
public const VALUE_SEPARATOR_NONE = '';
17+
1618
/**
1719
* Mark the option as required. If not defined the option is considered as optional.
1820
*
@@ -41,6 +43,13 @@ public function withRequiredValue(): self;
4143
*/
4244
public function withShortcut(string $shortcut): self;
4345

46+
/**
47+
* Use the name as shortcut and do not provide a full name option like --name, instead -name is available.
48+
*
49+
* @return $this
50+
*/
51+
public function withShortcutOnly(): self;
52+
4453
/**
4554
* Declare that a value is optional for this option. A default value may be defined also.
4655
*

0 commit comments

Comments
 (0)