Code Duplication    Length = 9-10 lines in 2 locations

lib/GitHub/Receiver/PullRequests.php 2 locations

@@ 101-110 (lines=10) @@
98
     * @return array
99
     * @throws \Exception
100
     */
101
    public function updatePullRequest(int $number, string $title = null, string $body = null,
102
                                      string $state = null): array
103
    {
104
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
105
            $this->getRepo(), $number), Request::METHOD_PATCH, [
106
                'title' => $title,
107
                'body'  => $body,
108
                'state' => $state
109
            ]);
110
    }
111
112
    /**
113
     * List commits on a pull request
@@ 180-188 (lines=9) @@
177
     * @return array
178
     * @throws \Exception
179
     */
180
    public function mergePullRequest(int $number, string $commitMessage = null, string $sha = null): array
181
    {
182
        return $this->getApi()->request($this->getApi()
183
                                             ->sprintf('/repos/:owner/:repo/pulls/:number/merge', $this->getOwner(),
184
                                                 $this->getRepo(), $number), Request::METHOD_PUT, [
185
                'commit_message' => $commitMessage,
186
                'sha'            => $sha
187
            ]);
188
    }
189
}