REBELinBLUE\Deployer\Project::tags PHP Method

tags() public method

Gets the list of all tags for the project.
public tags ( ) : Collection
return Illuminate\Support\Collection
    public function tags()
    {
        $tags = $this->refs()->where('is_tag', true)->lists('name')->toArray();
        $compare = new VersionCompare();
        // Sort the tags, if compare throws an exception it isn't a value version string so just do a strnatcmp
        @usort($tags, function ($first, $second) use($compare) {
            try {
                return $compare->compare($first, $second);
            } catch (UnexpectedValueException $error) {
                return strnatcmp($first, $second);
            }
        });
        return collect($tags);
    }