DispatchResult   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 52
ccs 0
cts 17
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getOutput() 0 3 1
A __construct() 0 5 1
A getExitCode() 0 3 1
A getErrorOutput() 0 3 1
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
}