setName(self::NAME) ->setDescription('Disables an API key.') ->addArgument('apiKey', InputArgument::REQUIRED, 'The API key to disable'); } protected function execute(InputInterface $input, OutputInterface $output): int { $apiKey = $input->getArgument('apiKey'); $io = new SymfonyStyle($input, $output); try { $this->apiKeyService->disable($apiKey); $io->success(sprintf('API key "%s" properly disabled', $apiKey)); return ExitCode::EXIT_SUCCESS; } catch (InvalidArgumentException $e) { $io->error($e->getMessage()); return ExitCode::EXIT_FAILURE; } } }