src/Helper/GitDirHelper.php
public function getGitDirectory(InputInterface $input, OutputInterface $output, $optionDir = null)
    {
        $dir = $optionDir;
        if (!$dir) {
            $dir = $this->getVcsDirectory();
        }
        if (!$dir) {
            $dir = $this->getCommandDir();
        }
        $validator = $this->getValidator();
        try {
            return $validator($dir);
        } catch (\Exception $e) {
        }

        return $this->askProjectDir($input, $output, $dir);
    }
public function getGitDirectory(InputInterface $input, OutputInterface $output, $optionDir = null)
    {
        $dir = $optionDir;
        if (!$dir) {
            $dir = $this->getVcsDirectory();
        }
        if (!$dir) {
            $dir = $this->getCommandDir();
        }
        $validator = $this->getValidator();
        try {
            return $validator($dir);
        } catch (\Exception $e) {
        }

        return $this->askProjectDir($input, $output, $dir);
    }
public function getGitDirectory ( InputInterface $ input , OutputInterface $ output , $ optionDir = null ) { $ dir = $ optionDir ; if ( ! $ dir ) { $ dir = $ this -> getVcsDirectory ( ) ; } if ( ! $ dir ) { $ dir = $ this -> getCommandDir ( ) ; } $ validator = $ this -> getValidator ( ) ; try { return $ validator ( $ dir ) ; } catch ( \ Exception $ e ) { } return $ this -> askProjectDir ( $ input , $ output , $ dir ) ; }
Get GIT directory

@param InputInterface  $input
@param OutputInterface $output
@param null|string     $optionDir
@return string
Get GIT directory