Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 0 |
1 | <?php |
||
27 | 30 | public function __invoke(): Process |
|
28 | { |
||
29 | 30 | if (!is_array($this->command)) { |
|
30 | 30 | $process = Process::fromShellCommandline($this->command); |
|
31 | } else { |
||
32 | $process = new Process($this->command); |
||
33 | } |
||
34 | 30 | if ($this->processParams !== null) { |
|
35 | 30 | $process->setTimeout($this->processParams->getTimeout()); |
|
36 | 30 | $process->setIdleTimeout($this->processParams->getIdleTimeout()); |
|
37 | 30 | $process->setEnv($this->processParams->getEnv()); |
|
38 | } |
||
39 | |||
40 | 30 | return $process; |
|
41 | } |
||
43 |