Code Duplication    Length = 11-11 lines in 2 locations

app/Model/Traits/User/CountTrait.php 2 locations

@@ 46-56 (lines=11) @@
43
     *
44
     * @return int
45
     */
46
    public function assignedIssuesCount($projectId = 0)
47
    {
48
        $issues = $this->issues();
49
50
        if (0 < $projectId) {
51
            $issues = $issues->where('project_id', '=', $projectId);
52
        }
53
        $issues->where('status', '=', Project\Issue::STATUS_OPEN);
54
55
        return $issues->count();
56
    }
57
58
    /**
59
     * Count number of created issues in a project.
@@ 65-75 (lines=11) @@
62
     *
63
     * @return int
64
     */
65
    public function createdIssuesCount($projectId = 0)
66
    {
67
        $issues = $this->issuesCreatedBy();
68
69
        if (0 < $projectId) {
70
            $issues = $issues->where('project_id', '=', $projectId);
71
        }
72
        $issues->where('status', '=', Project\Issue::STATUS_OPEN);
73
74
        return $issues->count();
75
    }
76
77
    /**
78
     * Returns all projects with open issue count.