public function setRemote(RemoteInterface $remote) { if (!$remote instanceof GitHubRemote) { throw new \InvalidArgumentException('Only GitHub remotes are supported for this repository'); } parent::setRemote($remote); }