helper->ask($input, $output, $question); $question = new Question('Enter client description (optional): ', ''); $clientDescription = $this->helper->ask($input, $output, $question); $question = new ChoiceQuestion('Enter client grants', [ 'authorization_code', 'client_credentials', 'refresh_token', 'password', ], 0); $question->setMultiselect(true); $grants = $this->helper->ask($input, $output, $question); $command = new CreateClientCommand($clientName, $grants, $clientDescription); try { /** @var Client $client */ $client = CommandBus::handle($command); $output->green('OAuth client created successfully'); $output->info('Client ID: ' . $client->client_id); $output->info('Client Secret: ' . $client->client_secret)->br(2); } catch (CommandHandlerException $exception) { $output->error($exception->getMessage()); return Command::FAILURE; } return Command::SUCCESS; } }