isGitDir() публичный Метод

Returns whether the current working dir is a Git directory.
public isGitDir ( boolean $requireRoot = true ) : boolean
$requireRoot boolean Require directory is the root of the Git repository, default is true.
Результат boolean
Пример #1
0
 /**
  * @runInSeparateProcess
  */
 public function testThrowExceptionForNonGitDir()
 {
     chdir(sys_get_temp_dir());
     $this->setExpectedExceptionRegExp('\\RuntimeException', '#^fatal: Not a git repository \\(or any of the parent directories\\): \\.git$#', 128);
     $this->assertFalse($this->git->isGitDir());
 }