public function tree(array $params = array()) { $data = $this->api('repo')->tree($this->id, $params); $tree = array(); foreach ($data as $node) { $tree[] = Node::fromArray($this->getClient(), $this, $node); } return $tree; }