diff --git a/src/CliProgram/BaseCommand.php b/src/CliProgram/BaseCommand.php index cd8116f..0d8f7ee 100644 --- a/src/CliProgram/BaseCommand.php +++ b/src/CliProgram/BaseCommand.php @@ -11,11 +11,11 @@ class BaseCommand extends Command { /** * Initialize the command * - * @param string $name The command name - * @param string ...$aliases The command aliases + * @param string|null $name The command name, Null = class name + * @param string ...$aliases The command aliases */ - public function __construct (string $name, string ...$aliases) { - parent::__construct($name); + public function __construct (?string $name = null, string ...$aliases) { + parent::__construct($name ?? get_class($this)); $this->setAliases($aliases); } } \ No newline at end of file