@@ -57,6 +57,8 @@ public static function make(array $arguments = [], array $options = []): InputDe
5757 *
5858 * @param array $arguments
5959 * @param array $options
60+ * @throws \LogicException
61+ * @throws \InvalidArgumentException
6062 */
6163 public function __construct (array $ arguments = [], array $ options = [])
6264 {
@@ -67,6 +69,7 @@ public function __construct(array $arguments = [], array $options = [])
6769 /**
6870 * @param array $arguments
6971 * @return InputDefinition
72+ * @throws \LogicException
7073 */
7174 public function setArguments (array $ arguments ): InputDefinition
7275 {
@@ -80,7 +83,7 @@ public function setArguments(array $arguments): InputDefinition
8083 * @return $this
8184 * @throws \LogicException
8285 */
83- public function addArguments (array $ arguments )
86+ public function addArguments (array $ arguments ): self
8487 {
8588 foreach ($ arguments as $ name => $ arg ) {
8689 $ arg = $ this ->mergeArgOptConfig ($ arg );
@@ -100,7 +103,7 @@ public function addArguments(array $arguments)
100103 * @return $this
101104 * @throws \LogicException
102105 */
103- public function addArgument ($ name , $ mode = null , $ description = '' , $ default = null )
106+ public function addArgument ($ name , $ mode = null , $ description = '' , $ default = null ): self
104107 {
105108 if (null === $ mode ) {
106109 $ mode = Input::ARG_OPTIONAL ;
@@ -248,7 +251,7 @@ public function addOptions(array $options = [])
248251 * @throws \InvalidArgumentException
249252 * @throws \LogicException
250253 */
251- public function addOption (string $ name , string $ shortcut = null , $ mode = null , $ description = '' , $ default = null )
254+ public function addOption (string $ name , string $ shortcut = null , $ mode = null , $ description = '' , $ default = null ): self
252255 {
253256 if (0 === strpos ($ name , '- ' )) {
254257 $ name = trim ($ name , '- ' );
@@ -369,6 +372,7 @@ public function hasShortcut(string $name): bool
369372 * Gets an option info array
370373 * @param string $shortcut the Shortcut name
371374 * @return array
375+ * @throws \InvalidArgumentException
372376 */
373377 public function getOptionByShortcut (string $ shortcut ): array
374378 {
@@ -504,7 +508,7 @@ public function getExample()
504508 * @param string|array $example
505509 * @return $this
506510 */
507- public function setExample ($ example )
511+ public function setExample ($ example ): self
508512 {
509513 $ this ->example = $ example ;
510514
@@ -523,7 +527,7 @@ public function getDescription()
523527 * @param string $description
524528 * @return $this
525529 */
526- public function setDescription (string $ description )
530+ public function setDescription (string $ description ): self
527531 {
528532 $ this ->description = $ description ;
529533
0 commit comments