*/ private array $commands = []; public function type(): ModuleContextType { return ModuleContextType::Console; } public function registerCommand(string $command): void { if (trim($command) === '') { throw new InvalidArgumentException('Console command class must not be empty'); } $this->commands[$command] = true; } public function commands(): array { return array_keys($this->commands); } }