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 ( 4e243a...9b019b )
by Anton
02:15
created

RunException::getFilename()   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 $filename;
15
    private $lineNumber;
16
    private $hostname;
17
    private $command;
18
    private $exitCode;
19
    private $output;
20
    private $errorOutput;
21
22
    public function __construct(
23
        string $filename,
24
        int $lineNumber,
25
        string $hostname,
26
        string $command,
27
        int $exitCode,
28
        string $output,
29
        string $errorOutput
30
    ) {
31
        $this->filename = $filename;
32
        $this->lineNumber = $lineNumber;
33
        $this->hostname = $hostname;
34
        $this->command = $command;
35
        $this->exitCode = $exitCode;
36
        $this->output = $output;
37
        $this->errorOutput = $errorOutput;
38
39
        $message = sprintf('The command "%s" failed.', $command);
40
        parent::__construct($message, $exitCode);
41
    }
42
43
    public function getFilename()
44
    {
45
        return $this->filename;
46
    }
47
48
    public function getLineNumber()
49
    {
50
        return $this->lineNumber;
51
    }
52
53
    public function getHostname(): string
54
    {
55
        return $this->hostname;
56
    }
57
58
    public function getCommand(): string
59
    {
60
        return $this->command;
61
    }
62
63
    public function getExitCode(): int
64
    {
65
        return $this->exitCode;
66
    }
67
68
    public function getExitCodeText(): string
69
    {
70
        return Process::$exitCodes[$this->exitCode] ?? 'Unknown error';
71
    }
72
73
    public function getOutput(): string
74
    {
75
        return $this->output;
76
    }
77
78
    public function getErrorOutput(): string
79
    {
80
        return $this->errorOutput;
81
    }
82
}
83