Appends a tag at the end of the list of tags.

@param Tag $tag The tag to add.

@return Tag The newly added tag.

@throws \LogicException When the tag belongs to a different DocBlock.
482419
public function appendTag(Tag $tag)
    {
        if (null === $tag->getDocBlock()) {
            $tag->setDocBlock($this);
        }

        if ($tag->getDocBlock() === $this) {
            $this->tags[] = $tag;
        } else {
            throw new \LogicException(
                'This tag belongs to a different DocBlock object.'
            );
        }

        return $tag;
    }
601831
protected void appendTag(CharSequence tag) {
        final TagView newTag = new TagView(getContext(), TagView.STATE_NORMAL, tag);
        newTag.setOnClickListener(mInternalTagClickListener);
        addView(newTag);
    }
963161
public function withTag($tag) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        array_push($this->tags, $tag);
        return $this;
    }
171702
public function addSelfClosingTag($tag): Dom
    {
        if ( ! is_array($tag)) {
            $tag = [$tag];
        }
        foreach ($tag as $value) {
            $this->selfClosing[] = $value;
        }

        return $this;
    }
839228
def addTag( self, tag ):
        
        if ( not (tag and self.isTagValid(tag)) ):
            return False
        
        self.blockSignals(True)
        create_item = self.createItem()
        if create_item:
            self.insertItem(self.row(create_item), XMultiTagItem(tag, self))
            create_item.setText('')
        else:
            self.addItem(XMultiTagItem(tag, self))
        self.blockSignals(False)
        
        if ( not self.signalsBlocked() ):
            self.tagCreated.emit(tag)
        
        return False
523460
public function removeTag($tag)
    {
        if (is_array($tag))
        {
            foreach ($tag as $t)
            {
                if (isset($this->allowed_tags[$t]))
                    unset($this->allowed_tags[$t]);
                $this->remove_tags[$t] = true;
            }
        }
        else
        {
            if (isset($this->allowed_tags[$tag]))
                unset($this->allowed_tags[$tag]);
            $this->remove_tags[$tag] = true;
        }
        return $this;
    }
1302484
public function addTags(array $tags)
    {
        $this->tagsChanges['added'] = array_unique(
            array_merge($this->tagsChanges['added'], $tags)
        );

        return $this;
    }
788452
public function getTagCommit(Tag $tag)
    {
        $this->clearAll();
        $this->addCommandName(static::GIT_REVLIST);
        // only the last commit
        $this->addCommandArgument('-n1');
        $this->addCommandSubject($tag->getFullRef());

        return $this->getCommand();
    }
356770
public function addTag($tag, $publicIds = array(), $options = array())
    {
        return $this->getUploader()->add_tag($tag, $publicIds, $options);
    }
1352751
@SuppressWarnings("unchecked")
	public T tag(final String tag) {
		if (this.tags == null) {
			this.tags = new HashSet<>();
		}

		this.tags.add(tag);
		return (T) this;
	}
1245782
public static function addDefaultOptions(Tag &$Tag)
    {
        if (isset(TagInfo::$defaultOptions[$Tag->name])) {
            foreach (TagInfo::$defaultOptions[$Tag->name] as $defopt) {
                if (!in_array($defopt, $Tag->options)) {
                    $Tag->options[] = $defopt;
                }
            }
        }
    }
160137
public function addTag($tag)
    {
        $tags = $this->getTags();
        array_push($tags, $tag);
        $this->setTags($tags);
    }
972052
public function tag($tag)
    {
        $route = $this->factory->createRoute($this, null, array());

        $this->addRoute($route);

        return $route->tag($tag);
    }
45581
public function attachTags($tags)
    {
        // Use 'sync' not 'attach' to avoid Integrity constraint violation
        $this->tags()->sync($this->parseTags($tags), false);

        return $this;
    }
711498
public function tag($tag)
    {
        $this->sys->exec(sprintf('git tag %s', $tag), 'Unable to create tag');
        $this->sys->exec('git push --tags', 'Unable to push tags');

        return $this;
    }
1030941
public function withTags($tags) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        foreach ($tags as $tag) {
            array_push($this->tags, $tags);
        }

        return $this;
    }
434969
protected function insertTag(Tag $tag)
	{
		if (!$this->tagStackIsSorted)
		{
			$this->tagStack[] = $tag;
		}
		else
		{
			// Scan the stack and copy every tag to the next slot until we find the correct index
			$i = count($this->tagStack);
			while ($i > 0 && self::compareTags($this->tagStack[$i - 1], $tag) > 0)
			{
				$this->tagStack[$i] = $this->tagStack[$i - 1];
				--$i;
			}
			$this->tagStack[$i] = $tag;
		}
	}