protected function getBranch(Gitonomy\Git\Reference $reference) { if ($reference instanceof Branch) { $this->branch = str_replace('origin/', '', $reference->getName()); $this->tag = NULL; $this->name = $this->branch; } elseif ($reference instanceof Tag) { $branch = explode('.', $reference->getName()); $this->branch = implode('.', [$branch[0], $branch[1], 'x']); $this->tag = $reference; $this->name = $this->tag->getName(); } }
public function Name() { return $this->reference->getName(); }