setDescription('Set value of a Stud.IP configuration key.'); $this->setHelp('This command will set the value of a Stud.IP configuration key.'); $this->addArgument('config-key', InputArgument::REQUIRED, 'Key of the configuration.'); $this->addArgument('config-value', InputArgument::REQUIRED, 'Value of the configuration.'); } protected function execute(InputInterface $input, OutputInterface $output): int { $configKey = $input->getArgument('config-key'); $configValue = $input->getArgument('config-value'); $metadata = \Config::get()->getMetadata($configKey); if (!$metadata) { throw new \RuntimeException("Unknown config key '{$configKey}"); } \Config::get()->store($configKey, $configValue); return Command::SUCCESS; } }