DispatchResult::getOutput()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Deployee\Plugins\Deploy\Dispatcher;
4
5
6
class DispatchResult implements DispatchResultInterface
7
{
8
    /**
9
     * @var int
10
     */
11
    private $exitCode;
12
13
    /**
14
     * @var string
15
     */
16
    private $stdOutput;
17
18
    /**
19
     * @var string
20
     */
21
    private $errOutput;
22
23
    /**
24
     * DispatchResult constructor.
25
     * @param int $exitCode
26
     * @param string $stdOutput
27
     * @param string $errOutput
28
     */
29
    public function __construct(int $exitCode, string $stdOutput, string $errOutput = '')
30
    {
31
        $this->exitCode = $exitCode;
32
        $this->stdOutput = $stdOutput;
33
        $this->errOutput = $errOutput;
34
    }
35
36
    /**
37
     * @return int
38
     */
39
    public function getExitCode(): int
40
    {
41
        return $this->exitCode;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getOutput(): string
48
    {
49
        return $this->stdOutput;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getErrorOutput(): string
56
    {
57
        return $this->errOutput;
58
    }
59
}