Code Duplication    Length = 10-13 lines in 2 locations

src/Aspects/GitHubRequest.php 1 location

@@ 15-24 (lines=10) @@
12
 * Simple Container for http-get request
13
 * GitHub edition
14
 */
15
class GitHubRequest extends HttpGetRequest
16
{
17
    const TOKEN_LABEL = 'github-token';
18
19
    public function promptAuth(HttpGetResponse $res, IO\IOInterface $io)
20
    {
21
        $util = new \Composer\Util\GitHub($io, $this->config, null);
22
        $this->promptAuthWithUtil(404, $util, $res, $io);
23
    }
24
}
25

src/Aspects/GitLabRequest.php 1 location

@@ 15-27 (lines=13) @@
12
 * Simple Container for http-get request
13
 * GitLab edition
14
 */
15
class GitLabRequest extends HttpGetRequest
16
{
17
    const TOKEN_LABEL = 'gitlab-token';
18
19
    /**
20
     * @codeCoverageIgnore
21
     */
22
    public function promptAuth(HttpGetResponse $res, IO\IOInterface $io)
23
    {
24
        $util = new \Composer\Util\GitLab($io, $this->config, null);
25
        $this->promptAuthWithUtil(401, $util, $res, $io);
26
    }
27
}
28