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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 57.14%
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 42
ccs 8
cts 14
cp 0.5714
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A connect() 0 4 1
A upload() 0 4 1
A download() 0 4 1
A run() 0 10 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