| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function run(CodeBlock $codeBlock): OutcomeInterface |
||
| 16 | { |
||
| 17 | $process = new PhpProcess("<?php $codeBlock"); |
||
| 18 | $process->run(); |
||
| 19 | |||
| 20 | if ($errorOutput = $process->getErrorOutput()) { |
||
| 21 | return new ErrorOutcome(trim($errorOutput)); |
||
| 22 | } |
||
| 23 | |||
| 24 | if ($output = $process->getOutput()) { |
||
| 25 | return new OutputOutcome($output); |
||
| 26 | } |
||
| 27 | |||
| 28 | return new VoidOutcome; |
||
| 29 | } |
||
| 31 |