| Conditions | 3 |
| Paths | 6 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function getCommandStdOut($command, $cwd, $default = '') |
||
| 12 | { |
||
| 13 | $command = \is_array($command) ? $command : \explode(' ', $command); |
||
| 14 | $process = new \Symfony\Component\Process\Process($command, $cwd); |
||
| 15 | $process->setTimeout(null); |
||
| 16 | try { |
||
| 17 | $process->mustRun(); |
||
| 18 | |||
| 19 | return $process->getOutput(); |
||
| 20 | } catch (\Symfony\Component\Process\Exception\ProcessFailedException $exception) { |
||
| 21 | return $default; |
||
| 22 | } |
||
| 25 |