@param array $tags

@return bool
322745
protected function getAuthStatusFromDocBlock(array $tags)
    {
        $authTag = collect($tags)
            ->first(function ($tag) {
                return $tag instanceof Tag && strtolower($tag->getName()) === 'authenticated';
            });

        return (bool) $authTag;
    }
1073833
public function removeByTag($tag)
    {
        $tags = (is_array($tag) ? $tag : array($tag));
        try {
            foreach ($tags as $tag) {
                $this->removeTag($tag);
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to delete cache for tag(s) %s : %s', \implode(',', $tags), $e->getMessage()));

            return false;
        }

        return true;
    }
796336
private function getContextualTags(array $tags)
    {
        foreach ($tags as &$tag) {
            $tag = $this->getContextualId($tag);
        }
        unset($tag);

        return $tags;
    }
1032379
public function untag($tags)
    {
        $tags = $this->makeTagsArray($tags);

        foreach ($tags as $tag)
            $this->removeOneTag($tag);

        return $this;
    }
475303
protected function getFormattedTags(array $tags)
    {
        $add =array();

        foreach ($tags as $key => $value) {
            if (is_bool($value)) {
                $value = $value ? "true" : "false";
            }
            $add[] = "#$key:$value";
        }

        return !empty($add) ? '|'.implode(',', $add) : null;
    }
144931
protected function isTagsMatchCondition($tags)
    {
        $satisfies = true;

        foreach (explode('&&', $this->filterString) as $andTags) {
            $satisfiesComma = false;

            foreach (explode(',', $andTags) as $tag) {
                $tag = str_replace('@', '', trim($tag));

                if ('~' === $tag[0]) {
                    $tag = mb_substr($tag, 1, mb_strlen($tag, 'utf8') - 1, 'utf8');
                    $satisfiesComma = !in_array($tag, $tags) || $satisfiesComma;
                } else {
                    $satisfiesComma = in_array($tag, $tags) || $satisfiesComma;
                }
            }

            $satisfies = (false !== $satisfiesComma && $satisfies && $satisfiesComma) || false;
        }

        return $satisfies;
    }
462972
public function monitor(array $tags)
    {
        $tags = array_diff($tags, $this->monitoring());

        if (empty($tags)) {
            return;
        }

        $this->table('telescope_monitoring')
                    ->insert(collect($tags)
                    ->mapWithKeys(function ($tag) {
                        return ['tag' => $tag];
                    })->all());
    }
756274
public function setTags($tags)
    {
        $this->tags = [];
        $this->ref = null;

        if (is_array($tags)) {
            foreach ($tags as $tag) {
                $this->addTag($tag);
            }
        } else {
            $this->addTag($tags);
        }

        return $this;
    }
1124400
private function tag_has_default(string $tag){
    return in_array('default', array_values(
      \is_array($this->tags[$tag]) ?
        $this->tags[$tag] :
        $this->tags[$this->tags[$tag]]
    ));
  }
701619
public function invalidateTags(array $tags)
    {
        $itemIds = [];
        foreach ($tags as $tag) {
            $itemIds = array_merge($itemIds, $this->getList($this->getTagKey($tag)));
        }

        // Remove all items with the tag
        $success = $this->deleteItems($itemIds);

        if ($success) {
            // Remove the tag list
            foreach ($tags as $tag) {
                $this->removeList($this->getTagKey($tag));
                $l = $this->getList($this->getTagKey($tag));
            }
        }

        return $success;
    }
1090257
public function filterByTags($tags)
    {
        $this->query->andWhere(
            $this->query->expr()->andX(
                $this->query->expr()->like('fv.fvTags', ':tags')
            )
        );
        $this->query->setParameter('tags', '%' . $tags . '%');
    }
529345
public function tagsToArray(array $tags): array
    {
        $result = [];

        foreach ($tags as $tag) {
            $tagType = $tag->getName();

            $result[$tagType][] = $tag->getDescription()->render();
        }

        return $result;
    }
29807
public function deleteByTags( array $tags )
	{
		foreach( $tags as $tag ) {
			$this->object->flushByTag( $this->prefix . $tag );
		}
	}
885667
protected function getCoveredTags(array $tags)
    {
        // Finds for actual tag names
        $matched = [];
        foreach ($this->tagCoverageList as $original) {
            $actual = $this->tagSearch($original, $tags);
            if (null !== $actual) {
                $matched[] = $actual;
            }
        }

        // Whitelist
        if ('whitelist' === $this->tagCoverageStrategy) {
            return $matched;
        }

        // Blacklist
        return array_values(array_diff($tags, $matched));
    }
156813
public function removeByTag($tag)
    {
        $tags = (array) $tag;

        if (0 == count($tags)) {
            return false;
        }

        try {
            $this->_repository
                    ->createQueryBuilder('c')
                    ->delete()
                    ->where('c._tag IN (:tags)')
                    ->setParameters(array('tags' => $this->getContextualTags($tags)))
                    ->getQuery()
                    ->execute();
            $this->resetCacheEntity();
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to remove cache for tags (%s) : %s', implode(',', $tags), $e->getMessage()));

            return false;
        }

        return true;
    }
186115
public function hasTag ($tag)
	{
		
		foreach ($this->lines as $line)
		{
			if (strpos ($line, '@' . $tag) === 0)
			{
				return TRUE;
			}
		}
		
		return FALSE;
		
	}
412634
public function deleteNotMatchingAnyTag(array $tags)
    {
        $this->collection->batchDelete(function (\Sokil\Mongo\Expression $e) use ($tags) {
            return $e->whereNotIn(Cache::FIELD_NAME_TAGS, $tags);
        });
        
        return $this;
    }