private static function getApplicationName(InputInterface $input, OutputInterface $output, QuestionHelper $helper)
    {
        $question = new Question('Choose your application name: ');
        $question->setValidator(function($answer) {
            if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $answer)) {
                throw new \InvalidArgumentException('The application name contains invalid characters.');
            }

            return ucfirst(strtolower($answer));
        });

        return $helper->ask($input, $output, $question);
    }