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.
Completed
Push — master ( 99078a...9605c1 )
by Oanh
02:49
created

Local::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 1
crap 1
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Server;
9
10
use Symfony\Component\Process\Process;
11
12
class Local implements ServerInterface
13
{
14
    const TIMEOUT = 300;
15
16
    /**
17
     * {@inheritdoc}
18
     */
19 1
    public function connect()
20
    {
21
        // We do not need to connect to local server.
22 1
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 11
    public function run($command)
28
    {
29 11
        $process = new Process($command);
30
        $process
31 11
            ->setTimeout(self::TIMEOUT)
32 11
            ->setIdleTimeout(self::TIMEOUT)
33 11
            ->mustRun();
34
35 11
        return $process->getOutput();
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function upload($local, $remote)
42
    {
43
        copy($local, $remote);
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function download($local, $remote)
50
    {
51
        copy($remote, $local);
52
    }
53
}
54