Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class ProcessTask extends Task implements HasMissingDependencyMessage |
||
13 | { |
||
14 | private $process; |
||
15 | |||
16 | /** |
||
17 | * @param string|Process $process |
||
18 | */ |
||
19 | 11 | public function __construct($process) |
|
20 | { |
||
21 | 11 | if (!$process instanceof Process) { |
|
22 | 11 | $process = Process::fromShellCommandline($process); |
|
23 | } |
||
24 | |||
25 | 11 | $this->process = $process; |
|
26 | |||
27 | 11 | parent::__construct($process->getCommandLine()); |
|
28 | 11 | } |
|
29 | |||
30 | 2 | public function getProcess(): Process |
|
31 | { |
||
32 | 2 | return $this->process; |
|
33 | } |
||
34 | |||
35 | 1 | public function getContext(): array |
|
40 | ]; |
||
41 | } |
||
42 | |||
43 | public static function getMissingDependencyMessage(): string |
||
48 |