Code Duplication    Length = 13-16 lines in 3 locations

lib/GitHub/Receiver/Issues.php 3 locations

@@ 38-50 (lines=13) @@
35
     *
36
     * @return array
37
     */
38
    public function listIssues(string $filter = AbstractApi::FILTER_ASSIGNED, string $state = AbstractApi::STATE_OPEN,
39
                               string $labels = '', string $sort = AbstractApi::SORT_CREATED,
40
                               string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
41
    {
42
        return $this->getApi()->request($this->getApi()->sprintf('/issues?:args', http_build_query([
43
                'filter'    => $filter,
44
                'state'     => $state,
45
                'labels'    => $labels,
46
                'sort'      => $sort,
47
                'direction' => $direction,
48
                'since'     => (new DateTime($since))->format(DateTime::ATOM)
49
            ])));
50
    }
51
52
    /**
53
     * List all issues across owned and member repositories for the authenticated user
@@ 66-79 (lines=14) @@
63
     *
64
     * @return array
65
     */
66
    public function listUserIssues(string $filter = AbstractApi::FILTER_ASSIGNED,
67
                                   string $state = AbstractApi::STATE_OPEN, string $labels = '',
68
                                   string $sort = AbstractApi::SORT_CREATED,
69
                                   string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
70
    {
71
        return $this->getApi()->request($this->getApi()->sprintf('/user/issues?:args', http_build_query([
72
                'filter'    => $filter,
73
                'state'     => $state,
74
                'labels'    => $labels,
75
                'sort'      => $sort,
76
                'direction' => $direction,
77
                'since'     => (new DateTime($since))->format(DateTime::ATOM)
78
            ])));
79
    }
80
81
    /**
82
     * List all issues for a given organization for the authenticated user
@@ 96-111 (lines=16) @@
93
     *
94
     * @return array
95
     */
96
    public function listOrganizationIssues(string $organization, string $filter = AbstractApi::FILTER_ASSIGNED,
97
                                           string $state = AbstractApi::STATE_OPEN, string $labels = '',
98
                                           string $sort = AbstractApi::SORT_CREATED,
99
                                           string $direction = AbstractApi::DIRECTION_DESC,
100
                                           string $since = '1970-01-01'): array
101
    {
102
        return $this->getApi()->request($this->getApi()
103
                                             ->sprintf('/orgs/:org/issues?:args', $organization, http_build_query([
104
                                                     'filter'    => $filter,
105
                                                     'state'     => $state,
106
                                                     'labels'    => $labels,
107
                                                     'sort'      => $sort,
108
                                                     'direction' => $direction,
109
                                                     'since'     => (new DateTime($since))->format(DateTime::ATOM)
110
                                                 ])));
111
    }
112
113
    /**
114
     * List issues for a repository