repo = $repo; parent::__construct($api_url, $api_token); } protected function set_scope(string $method) { switch ($method) { case "get": case "load": if ($owner == null) throw new Exception\InvalidMethodRequestException("Missing repository for branches"); $this->scope = sprintf("/repos/%s/%s/branches", $this->repo->owner, $this->repo->name); return true; } return false; } } }