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::getHostname()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
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