Gush\Command\Issue\IssueCreateCommand::interact PHP Метод

interact() защищенный Метод

protected interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function interact(InputInterface $input, OutputInterface $output)
    {
        $emptyValidator = function ($string) {
            if (trim($string) === '') {
                throw new \InvalidArgumentException('This value cannot be empty');
            }
            return $string;
        };
        $styleHelper = $this->getHelper('gush_style');
        if ('' === (string) $input->getOption('title')) {
            $input->setOption('title', $styleHelper->ask('Issue title', null, $emptyValidator));
        }
        if ('' === (string) $input->getOption('body')) {
            $body = $styleHelper->ask('Body (enter "e" to open editor)', '');
            if ('e' === $body) {
                /** @var EditorHelper $editor */
                $editor = $this->getHelper('editor');
                $body = $editor->fromString('');
            }
            $input->setOption('body', $body);
        }
    }