Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 0 |
1 | <?php |
||
22 | 15 | protected function doRun(Code $code) |
|
23 | { |
||
24 | 15 | $file = $this->createTemporaryFile(); |
|
25 | 15 | $code->writeTo($file); |
|
26 | |||
27 | 15 | $process = new Process([PHP_BINARY ?: "php", $file]); |
|
28 | 15 | $process->run(); |
|
29 | |||
30 | 15 | if (!@unlink($file)) { |
|
31 | $this->logger->debug(sprintf('CLI: Could not delete file: %s', $file)); |
||
32 | } |
||
33 | |||
34 | 15 | return $process->getOutput(); |
|
35 | } |
||
37 |