Return the last created tag

@throws \LogicException
@throws \RuntimeException
@throws \InvalidArgumentException
@return Tag|null
343277
public function getLastTag()
    {
        $finder = Finder::create()
            ->files()
            ->in(sprintf('%s/.git/refs/tags', $this->path))
            ->sortByChangedTime();

        if ($finder->count() == 0) {
            return null;
        }

        $files = iterator_to_array($finder->getIterator(), false);
        $files = array_reverse($files);
        /** @var $firstFile SplFileInfo */
        $firstFile = $files[0];
        $tagName = $firstFile->getFilename();

        return Tag::pick($this, $tagName);
    }
108515
public function last()
    {
        $this->generatorToArray();

        $key_last = \array_key_last($this->array);

        if ($key_last === null) {
            return null;
        }

        return $this->get($key_last);
    }
1304457
public static function getTags()
    {
        $finder = new Tag\Finder\Finder();

        foreach (func_get_args() as $arg) {
            if (is_string($arg)) {
                $finder->addFilter(new Tag\Finder\Group($arg));
            } elseif ($arg instanceof PageInterface) {
                $finder->addFilter(new Tag\Finder\AppliedToPage($arg));
            } elseif ($arg instanceof TagInterface) {
                $finder->addFilter(new Tag\Finder\AppliedWith($arg));
            }
        }

        return $finder
            ->setOrderBy('group', 'asc')
            ->setOrderBy('name', 'asc')
            ->findAll();
    }
1111923
public function last()
    {
        foreach ($this->dataQuery->lastRow()->execute() as $row) {
            return $this->createDataObject($row);
        }
        return null;
    }
1049832
public function getTag() {
		if($this->exists()) {
			$url = $this->getURL();
			$title = ($this->Title) ? $this->Title : $this->Filename;
			if($this->Title) {
				$title = Convert::raw2att($this->Title);
			} else {
				if(preg_match("/([^\/]*)\.[a-zA-Z0-9]{1,6}$/", $title, $matches)) {
					$title = Convert::raw2att($matches[1]);
				}
			}
			return "<img src=\"$url\" alt=\"$title\" ".$this->getAttributesHTML()." />";
		}
	}
55296
public function getTag()
    {
        if (null === $this->_tag) {
            $tag = $this->getOption('tag');
            if (null !== $tag) {
                $this->removeOption('tag');
            } else {
                $tag = 'span';
            }

            $this->setTag($tag);
            return $tag;
        }

        return $this->_tag;
    }
1267573
public Object getTag() {
        Object result = null;
        if (view != null) {
            result = view.getTag();
        }
        return result;
    }
665104
public function last()
	{
		$set = array_slice($this->list, -1, 1, true);
		
		return isset($set[0]) ? $set[0] : null;
	}
215750
function getLastMessage() {
        if(!empty($this->lastMessageID) && $this->messages->has($this->lastMessageID)) {
            return $this->messages->get($this->lastMessageID);
        }
        
        return null;
    }
379304
public function last()
    {
        $arr = $this->val();
        $last = end($arr);

        return StdObjectWrapper::returnStdObject($last);
    }
151445
public function lastTag(string $name)
    {
        $lastTag = null;

        foreach ($this->tags as $tag) {
            if ($tag->name == $name) {
                $lastTag = $tag;
            }
        }

        return $lastTag;
    }
1350615
public function getLastResponseXML()
    {
        $response = null;
        if (isset($this->_lastResponse)) {
            if (is_string($this->_lastResponse)) {
                $response = $this->_lastResponse;
            } else {
                $response = $this->_lastResponse->saveXML();
            }
        }
        
        return $response;
    }
769581
public function getCurrentTag()
    {
        /**
         * @var Blog $dataRecord
         */
        $dataRecord = $this->dataRecord;
        $tag = $this->request->param('Tag');
        if ($tag) {
            $filter = URLSegmentFilter::create();
            // url encode unless it's multibyte (already pre-encoded in the database)
            // see https://github.com/silverstripe/silverstripe-cms/pull/2384
            if (!$filter->getAllowMultibyte()) {
                $tag = rawurlencode($tag);
            }

            return $dataRecord->Tags()
                ->filter('URLSegment', $tag)
                ->first();
        }
        return null;
    }
1320413
public function getTags()
    {
        static $cache = array();

        if (array_key_exists($this->path, $cache)) {
            return $cache[$this->path];
        }

        $tags = $this->getClient()->run($this, 'tag');
        $tags = explode("\n", $tags);
        array_pop($tags);

        if (empty($tags[0])) {
            return $cache[$this->path] = null;
        }

        return $cache[$this->path] = $tags;
    }
268587
public function getTagged(int $tag): TaggedType
    {
        if (!$this->hasTagged($tag)) {
            throw new \LogicException("No tagged element for tag $tag.");
        }
        return $this->_taggedMap[$tag];
    }
388011
public function current()
    {
        $keys = array_keys($this->tags);
        return $this->tags[$keys[$this->position]];
    }
1204864
public function getLastLine()
    {
        if (!$this->lastStatement) {
            $this->lastStatement = $this->statements[\count($this->statements) - 1];
        }
    }