| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function run($command, $killAfterSeconds = 5): Process |
||
| 33 | { |
||
| 34 | if ($this->timeout) { |
||
| 35 | $shellCommandLine = "timeout --kill-after=" . $killAfterSeconds . "s 1m " . $command; |
||
| 36 | } else { |
||
| 37 | $shellCommandLine = $command; |
||
| 38 | } |
||
| 39 | |||
| 40 | $process = Process::fromShellCommandline($shellCommandLine); |
||
| 41 | |||
| 42 | $process->run(); |
||
| 43 | |||
| 44 | return $process; |
||
| 45 | } |
||
| 75 | } |