Code Duplication    Length = 9-10 lines in 5 locations

src/Repo/PaginatedKnpLabsRepoFacade.php 5 locations

@@ 80-88 (lines=9) @@
77
    /**
78
     * @return array
79
     */
80
    public function fetchAllBranchNames()
81
    {
82
        $parameters = [
83
            $this->githubRepo->getOwner(),
84
            $this->githubRepo->getName(),
85
        ];
86
87
        return $this->paginator->fetchAll($this->getRepoApi(), 'branches', $parameters);
88
    }
89
90
    /**
91
     * @return array
@@ 93-101 (lines=9) @@
90
    /**
91
     * @return array
92
     */
93
    public function fetchAllTagNames()
94
    {
95
        $parameters = [
96
            $this->githubRepo->getOwner(),
97
            $this->githubRepo->getName(),
98
        ];
99
100
        return $this->paginator->fetchAll($this->getRepoApi(), 'tags', $parameters);
101
    }
102
103
    /**
104
     * Fetches GithubCommit details.
@@ 157-166 (lines=10) @@
154
    /**
155
     * @return array
156
     */
157
    public function fetchAllPullRequests()
158
    {
159
        $parameters = [
160
            $this->githubRepo->getOwner(),
161
            $this->githubRepo->getName(),
162
            ['state' => 'all'],
163
        ];
164
165
        return $this->paginator->fetchAll($this->getPullRequestApi(), 'all', $parameters);
166
    }
167
168
    /**
169
     * @return array
@@ 171-180 (lines=10) @@
168
    /**
169
     * @return array
170
     */
171
    public function fetchAllMilestones()
172
    {
173
        $parameters = [
174
            $this->githubRepo->getOwner(),
175
            $this->githubRepo->getName(),
176
            ['state' => 'all'],
177
        ];
178
179
        return $this->paginator->fetchAll($this->getMilestonesApi(), 'all', $parameters);
180
    }
181
182
    /**
183
     * Returns all issues.
@@ 207-216 (lines=10) @@
204
    /**
205
     * @return array
206
     */
207
    public function fetchAllIssuesAndPullRequests()
208
    {
209
        $parameters = [
210
            $this->githubRepo->getOwner(),
211
            $this->githubRepo->getName(),
212
            ['state' => 'all'],
213
        ];
214
215
        return $this->paginator->fetchAll($this->getIssueApi(), 'all', $parameters);
216
    }
217
218
    /**
219
     * @return \Github\Api\ApiInterface