questionFactory = $questionFactory; $this->questionHelper = $questionHelper; } /** * Collect list of configuration values from user input * * For example, this method will return * * ```php * [ * 'some/configuration/path1' => 'someValue1', * 'some/configuration/path2' => 'someValue2', * 'some/configuration/path3' => 'someValue3', * ] * ``` * {@inheritdoc} */ public function getValues(InputInterface $input, OutputInterface $output, array $configPaths) { $output->writeln('Please set configuration values or skip them by pressing [Enter]:'); $values = []; foreach ($configPaths as $configPath) { $question = $this->questionFactory->create([ 'question' => $configPath . ': ' ]); $values[$configPath] = $this->questionHelper->ask($input, $output, $question); } return $values; } }