Code Duplication    Length = 12-12 lines in 2 locations

app/Form/FilterIssue.php 1 location

@@ 43-54 (lines=12) @@
40
     *
41
     * @return \Illuminate\Database\Eloquent\Collection|null
42
     */
43
    protected function getTags($type = null)
44
    {
45
        if ($this->tags === null) {
46
            $this->tags = (new Model\Tag())->getGroupTags();
47
        }
48
49
        if ($type) {
50
            return $this->tags->where('name', $type)->first()->tags;
51
        }
52
53
        return $this->tags;
54
    }
55
56
    /**
57
     * @param array $params

app/Form/Issue.php 1 location

@@ 43-54 (lines=12) @@
40
     *
41
     * @return \Illuminate\Database\Eloquent\Collection|null
42
     */
43
    protected function getTags($type = null)
44
    {
45
        if ($this->tags === null) {
46
            $this->tags = (new Model\Tag())->getGroupTags();
47
        }
48
49
        if ($type) {
50
            return $this->tags->where('name', $type)->first()->tags;
51
        }
52
53
        return $this->tags;
54
    }
55
56
    /**
57
     * Get issue tag for specific type/group.