sourceControl = $sourceControl; } /** * @throws SourceControlIsNotConnected * @throws RepositoryNotFound * @throws RepositoryPermissionDenied */ protected function handleResponseErrors(Response $res, string $repo): void { if ($res->status() == 401) { throw new SourceControlIsNotConnected($this->sourceControl); } if ($res->status() == 404) { throw new RepositoryNotFound($repo); } if ($res->status() == 403) { throw new RepositoryPermissionDenied($repo); } } }