diff --git a/src/commands/AbstractBaseCommand.php b/src/commands/AbstractBaseCommand.php index 8907827..ff19c16 100644 --- a/src/commands/AbstractBaseCommand.php +++ b/src/commands/AbstractBaseCommand.php @@ -88,7 +88,8 @@ protected function setRunwayConfigValue(string $key, $value): void { * * @return $this */ - public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null): self { + public function addOption(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null): self + { // Build raw option format Ahc\Cli expects, e.g. "-s, --name" or "--name" $raw = ''; @@ -139,7 +140,8 @@ public function addOption(string $name, $shortcut = null, int $mode = null, stri * * @return $this */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null): self { + public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null): self + { if ($mode === null) { $mode = self::OPTIONAL; }