/** * Delete a tag * * @param string|Tag $tag The name of tag, or the Tag instance to delete * * @throws \RuntimeException * @return string the command */ public function delete($tag) { $this->clearAll(); $name = $tag; if ($tag instanceof Tag) { $name = $tag->getName(); } $this->addCommandName(self::TAG_COMMAND); $this->addCommandArgument('-d'); $this->addCommandSubject($name); return $this->getCommand(); }