/** * Constructs a new instance. * * @param $path File path to this repository * @param Git $git Git instance used to execute commands in context of the repository. * @throws Exception\RuntimeException */ public function __construct($path, Git $git) { if (false === $git->repoExists($path)) { throw new RepoNotFoundException("No Git repository found at {$path}"); } $this->path = (string) $path; $this->git = $git; }