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 = 25-25 lines in 2 locations

src/php/Storyplayer/SPv2/Modules/Host/FromHost.php 1 location

@@ 587-611 (lines=25) @@
584
     * @param  string $destFilename
585
     * @return \DataSift\Storyplayer\CommandLib\CommandResult
586
     */
587
    public function downloadFile($sourceFilename, $destFilename)
588
    {
589
        // what are we doing?
590
        $log = usingLog()->startAction("download file '{$this->args[0]}':'{$sourceFilename}' to '{$destFilename}'");
591
592
        // make sure we have valid host details
593
        $hostDetails = $this->getHostDetails();
594
595
        // get an object to talk to this host
596
        $host = OsLib::getHostAdapter($this->st, $hostDetails->osName);
597
598
        // upload the file
599
        $result = $host->downloadFile($hostDetails, $sourceFilename, $destFilename);
600
601
        // did the command used to upload succeed?
602
        if ($result->didCommandFail()) {
603
            $msg = "download failed with return code '{$result->returnCode}' and output '{$result->output}'";
604
            $log->endAction($msg);
605
            throw Exceptions::newActionFailedException(__METHOD__, $msg);
606
        }
607
608
        // all done
609
        $log->endAction();
610
        return $result;
611
    }
612
613
    /**
614
     * @param  string $filename

src/php/Storyplayer/SPv2/Modules/Host/UsingHost.php 1 location

@@ 63-87 (lines=25) @@
60
 */
61
class UsingHost extends HostBase
62
{
63
    public function runCommand($command)
64
    {
65
        // what are we doing?
66
        $log = usingLog()->startAction("run command '{$command}' on host '{$this->args[0]}'");
67
68
        // make sure we have valid host details
69
        $hostDetails = $this->getHostDetails();
70
71
        // get an object to talk to this host
72
        $host = OsLib::getHostAdapter($this->st, $hostDetails->osName);
73
74
        // run the command in the guest operating system
75
        $result = $host->runCommand($hostDetails, $command);
76
77
        // did the command succeed?
78
        if ($result->didCommandFail()) {
79
            $msg = "command failed with return code '{$result->returnCode}' and output '{$result->output}'";
80
            $log->endAction($msg);
81
            throw Exceptions::newActionFailedException(__METHOD__, $msg);
82
        }
83
84
        // all done
85
        $log->endAction();
86
        return $result;
87
    }
88
89
    public function runCommandAsUser($command, $user)
90
    {