Total Complexity | 6 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class TaskCompleted |
||
13 | { |
||
14 | private $server; |
||
15 | private $output; |
||
16 | private $exitCode; |
||
17 | |||
18 | public function __construct(Server $server, string $output, int $exitCode) |
||
19 | { |
||
20 | $this->server = $server; |
||
21 | $this->output = $output; |
||
22 | $this->exitCode = $exitCode; |
||
23 | } |
||
24 | |||
25 | public function isSuccessful() : bool |
||
26 | { |
||
27 | return 0 === $this->exitCode; |
||
28 | } |
||
29 | |||
30 | public function getServer() : Server |
||
31 | { |
||
32 | return $this->server; |
||
33 | } |
||
34 | |||
35 | public function getOutput() : string |
||
36 | { |
||
37 | return $this->output; |
||
38 | } |
||
39 | |||
40 | public function getTrimmedOutput() : string |
||
41 | { |
||
42 | return trim($this->output); |
||
43 | } |
||
44 | |||
45 | public function getExitCode() : int |
||
48 | } |
||
49 | } |
||
50 |