src/Helper/GitDirHelper.php
public function askProjectDir(
        InputInterface $input,
        OutputInterface $output,
        $dir = null,
        SymfonyStyle $style = null
    ) {
        $question = $this->getSimpleQuestion()
            ->getQuestion('Please set your root project directory.', $dir);
        $question->setValidator(
            $this->getValidator()
        );

        $style = $style ?: new SymfonyStyle($input, $output);
        $dir   = $style->askQuestion($question);

        return rtrim($dir, '\\/');
    }
public function askProjectDir(
        InputInterface $input,
        OutputInterface $output,
        $dir = null,
        SymfonyStyle $style = null
    ) {
        $question = $this->getSimpleQuestion()
            ->getQuestion('Please set your root project directory.', $dir);
        $question->setValidator(
            $this->getValidator()
        );

        $style = $style ?: new SymfonyStyle($input, $output);
        $dir   = $style->askQuestion($question);

        return rtrim($dir, '\\/');
    }
public function askProjectDir ( InputInterface $ input , OutputInterface $ output , $ dir = null , SymfonyStyle $ style = null ) { $ question = $ this -> getSimpleQuestion ( ) -> getQuestion ( 'Please set your root project directory.' , $ dir ) ; $ question -> setValidator ( $ this -> getValidator ( ) ) ; $ style = $ style ? : new SymfonyStyle ( $ input , $ output ) ; $ dir = $ style -> askQuestion ( $ question ) ; return rtrim ( $ dir , '\\/' ) ; }
Ask about GIT project root dir

It will skip asking if system is able to identify it.

@param InputInterface  $input
@param OutputInterface $output
@param string|null     $dir
@param SymfonyStyle    $style
@return string
Ask about GIT project root dir