Gitonomy\Git\Repository::isBare PHP Method

isBare() public method

Tests if repository is a bare repository.
public isBare ( ) : boolean
return boolean
    public function isBare()
    {
        return null === $this->workingDir;
    }

Usage Example

 public function __construct(Repository $repository)
 {
     $this->repository = $repository;
     if ($this->repository->isBare()) {
         throw new LogicException('Can\'t create a working copy on a bare repository');
     }
 }