Return Tags that point to this commit

@return Tag[]
162028
public function getTags()
    {
        $currentCommitTags = [];

        /** @var Tag $tag */
        foreach ($this->repository->getTags() as $tag) {
            if ($tag->getSha() === $this->getSha()) {
                $currentCommitTags[] = $tag;
            }
        }

        return $currentCommitTags;
    }
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();
    }
780747
public static function getInstantiatedTagObjects()
    {
        $context = self::getInstance();
        foreach ($context->tags as $key => $config) {
            $context->instantiatTag($key);
        }
        
        return $context->tags;
    }
741268
public List<Tag> getRootTags()
    {
        return this.definedTags.values().stream()
                    .filter(Tag::isRoot)
                    .collect(Collectors.toList());
    }
121567
public function getTagged($tag)
	{
		$services = array();

		if (isset($this->tags[$tag]))
		{
			foreach ($this->tags[$tag] as $service)
			{
				$services[] = $this->get($service);
			}
		}

		return $services;
	}
1097870
protected function checkAnnotationTagOrder(array $tags): array
    {
        $order = $this->getTagOrderMap();

        $currentOrder = null;
        foreach ($tags as $i => $tag) {
            if (!isset($order[$tag['tag']])) {
                if ($currentOrder !== null) {
                    $tags[$i]['error'] = 'Position of ' . $tag['tag'] . ' tag too low.';
                    return $tags;
                }
                continue;
            }

            $tagOrder = $order[$tag['tag']];
            if ($currentOrder === null || $tagOrder >= $currentOrder) {
                $currentOrder = $tagOrder;
                continue;
            }

            $tags[$i]['error'] = 'Position of ' . $tag['tag'] . ' tag too low.';
            continue;
        }

        return $tags;
    }
705753
public function getTags()
    {
        if (!$this->tags) {
            $this->tags = array();

            foreach ($this->events as $event) {
                $this->tags = array_merge($this->tags, $event->getTags());
            }

            $this->tags = array_values(array_unique($this->tags));
        }

        return $this->tags;
    }
256013
public function get_related_tags() {
        $manual = $this->get_manual_related_tags();
        $automatic = $this->get_correlated_tags();
        $relatedtags = array_merge($manual, $automatic);

        // Remove duplicated tags (multiple instances of the same tag).
        $seen = array();
        foreach ($relatedtags as $instance => $tag) {
            if (isset($seen[$tag->id])) {
                unset($relatedtags[$instance]);
            } else {
                $seen[$tag->id] = 1;
            }
        }

        return $relatedtags;
    }
877366
public function findTags()
    {
        $tags = [];
        foreach ($this->getDefinitions() as $id => $definition) {
            $tags = array_merge(array_keys($definition->getTags()), $tags);
        }

        return array_unique($tags);
    }
440669
private function getAllTags(){
        if($comment = $this->getDocComment()){
            if(preg_match_all("/\@(\w+)(.*)/", $comment,$m)){
                foreach($m[0] as $i=>$result){
                    $tag = $m[1][$i];
                    $tagValue = trim($m[2][$i]);
                    $this->{"_{$tag}"} = $tagValue;
                }
            }
        }
    }
408151
public function getCurrentTags()
    {
        if (!isset($this->_currentTags)) {
            if (!$this->viaClass) {
                return [];
            }
            $viaClass = $this->viaClass;
            $params = [$this->viaLocalField => $this->owner->primaryKey];
            $rawTags = $viaClass::find()->disableAccessCheck()->where($params)->select($this->viaForeignField)->column();

            $this->_currentTags = [];
            foreach ($rawTags as $tag) {
                $this->_currentTags[$tag] = $tag;
            }
        }

        return $this->_currentTags;
    }
1031207
public function getTags()
    {
        return $this->hasMany(Tag::class, ['id' => 'tag_id'])->viaTable('{{%admin_tag_relation}}', ['pk_id' => 'id'], function ($query) {
            $query->andWhere(['table_name' => static::cleanBaseTableName(static::tableName())]);
        });
    }
255355
protected function getTags()
    {
        $featureTags = $this->getFeature()->getTags();
        $scenarioTags = $this->getScenario()->getTags();
        return array_unique(array_merge($featureTags, $scenarioTags));
    }
446574
public function getTagsArray()
    {
        $result = [];

        foreach($this->tags as $tag) {
            $result[] = $tag->toArray();
        }

        return $result;
    }
146260
protected function getTags($tag = null)
    {
        $tags = [$this->cacheKey];

        if ($tag) {
            if (! is_array($tag)) {
                $tag = [$tag];
            }

            $tags = array_merge($tags, $tag);
        }

        return $tags;
    }
1347040
protected function getTagsFromMySQL()
    {
        $queryParts = $this->getQueryParts();

        $queryBuilder = self::getQueryBuilder('tx_kesearch_index');
        $queryBuilder->getRestrictions()->removeAll();

        $tagRows = $queryBuilder
            ->select('tags')
            ->from($queryParts['FROM'])
            ->add('where', $queryParts['WHERE'])
            ->execute()
            ->fetchAll();

        return array_map(
            function ($row) {
                return $row['tags'];
            },
            $tagRows
        );
    }
418312
public Tag[] firstSentenceTags() {
        if (firstSentence == null) {
            //Parse all sentences first to avoid duplicate warnings.
            inlineTags();
            try {
                docenv().setSilent(true);
                firstSentence = Comment.firstSentenceTags(holder, text);
            } finally {
                docenv().setSilent(false);
            }
        }
        return firstSentence;
    }