GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 20-20 lines in 2 locations

src/functions.php 2 locations

@@ 420-439 (lines=20) @@
417
 * @param string $destination
418
 * @param array $config
419
 */
420
function upload($source, $destination, array $config = [])
421
{
422
    $rsync = Deployer::get()->rsync;
423
    $host = Context::get()->getHost();
424
    $source = parse($source);
425
    $destination = parse($destination);
426
427
    if ($host instanceof Localhost) {
428
        $rsync->call($host->getHostname(), $source, $destination, $config);
429
    } else {
430
        $sshArguments = $host->getSshArguments()->getCliArguments();
431
        if (empty($sshArguments) === false) {
432
            if (!isset($config['options']) || !is_array($config['options'])) {
433
                $config['options'] = [];
434
            }
435
            $config['options'][] = "-e 'ssh $sshArguments'";
436
        }
437
        $rsync->call($host->getHostname(), $source, "$host:$destination", $config);
438
    }
439
}
440
441
/**
442
 * Download file or directory from host
@@ 448-467 (lines=20) @@
445
 * @param string $source
446
 * @param array $config
447
 */
448
function download($source, $destination, array $config = [])
449
{
450
    $rsync = Deployer::get()->rsync;
451
    $host = Context::get()->getHost();
452
    $source = parse($source);
453
    $destination = parse($destination);
454
455
    if ($host instanceof Localhost) {
456
        $rsync->call($host->getHostname(), $source, $destination, $config);
457
    } else {
458
        $sshArguments = $host->getSshArguments()->getCliArguments();
459
        if (empty($sshArguments) === false) {
460
            if (!isset($config['options']) || !is_array($config['options'])) {
461
                $config['options'] = [];
462
            }
463
            $config['options'][] = "-e 'ssh $sshArguments'";
464
        }
465
        $rsync->call($host->getHostname(), "$host:$source", $destination, $config);
466
    }
467
}
468
469
/**
470
 * Writes a message to the output and adds a newline at the end.