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.
Passed
Push — master ( e51949...763526 )
by Anton
01:57
created

RunException   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 55
rs 10
c 0
b 0
f 0
ccs 0
cts 39
cp 0
wmc 7
lcom 1
cbo 2

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
A getHostname() 0 4 1
A getCommand() 0 4 1
A getExitCode() 0 4 1
A getExitCodeText() 0 4 1
A getOutput() 0 4 1
A getErrorOutput() 0 4 1
1
<?php declare(strict_types=1);
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\Exception;
9
10
use Symfony\Component\Process\Process;
11
12
class RunException extends Exception
13
{
14
    private $hostname;
15
    private $command;
16
    private $exitCode;
17
    private $output;
18
    private $errorOutput;
19
20
    public function __construct(
21
        string $hostname,
22
        string $command,
23
        int $exitCode,
24
        string $output,
25
        string $errorOutput
26
    ) {
27
        $this->hostname = $hostname;
28
        $this->command = $command;
29
        $this->exitCode = $exitCode;
30
        $this->output = $output;
31
        $this->errorOutput = $errorOutput;
32
33
        $message = sprintf('The command "%s" failed.', $command);
34
        parent::__construct($message, $exitCode);
35
    }
36
37
    public function getHostname(): string
38
    {
39
        return $this->hostname;
40
    }
41
42
    public function getCommand(): string
43
    {
44
        return $this->command;
45
    }
46
47
    public function getExitCode(): int
48
    {
49
        return $this->exitCode;
50
    }
51
52
    public function getExitCodeText(): string
53
    {
54
        return Process::$exitCodes[$this->exitCode] ?? 'Unknown error';
55
    }
56
57
    public function getOutput(): string
58
    {
59
        return $this->output;
60
    }
61
62
    public function getErrorOutput(): string
63
    {
64
        return $this->errorOutput;
65
    }
66
}
67