public function branches() { $data = $this->api('repo')->branches($this->id); $branches = array(); foreach ($data as $branch) { $branches[] = Branch::fromArray($this->getClient(), $this, $branch); } return $branches; }