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

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