Code Duplication    Length = 6-6 lines in 3 locations

src/Browscap.php 3 locations

@@ 342-347 (lines=6) @@
339
        $uri      = (new IniLoader())->setRemoteFilename($remoteFile)->getRemoteIniUrl();
340
        $response = $this->getClient()->get($uri, ['timeout' => 5]);
341
342
        if ($response->getStatusCode() !== 200) {
343
            throw new FetcherException(
344
                'an error occured while fetching remote data from URI ' . $uri . ': StatusCode was '
345
                . $response->getStatusCode()
346
            );
347
        }
348
349
        try {
350
            $content = $response->getBody()->getContents();
@@ 440-445 (lines=6) @@
437
            $uri      = (new IniLoader())->setRemoteFilename($remoteFile)->getRemoteIniUrl();
438
            $response = $this->getClient()->get($uri, ['timeout' => 5]);
439
440
            if ($response->getStatusCode() !== 200) {
441
                throw new FetcherException(
442
                    'an error occured while fetching remote data from URI ' . $uri . ': StatusCode was '
443
                    . $response->getStatusCode()
444
                );
445
            }
446
447
            try {
448
                $content = $response->getBody()->getContents();
@@ 487-492 (lines=6) @@
484
        $uri      = (new IniLoader())->getRemoteVersionUrl();
485
        $response = $this->getClient()->get($uri, ['timeout' => 5]);
486
487
        if ($response->getStatusCode() !== 200) {
488
            throw new FetcherException(
489
                'an error occured while fetching version data from URI ' . $uri . ': StatusCode was '
490
                . $response->getStatusCode()
491
            );
492
        }
493
494
        try {
495
            $remoteVersion = $response->getBody()->getContents();