| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function getCoverage() |
||
| 51 | { |
||
| 52 | $process = new Process($this->phpUnit . ' --coverage-text|grep Classes|cut -d " " -f 4|cut -d "%" -f 1'); |
||
| 53 | $process->run(); |
||
| 54 | $output = $process->getOutput(); |
||
| 55 | if (!$process->isSuccessful() || empty($output)) { |
||
| 56 | throw new RuntimeException('error while executing PHPUnit: ' . $process->getErrorOutput()); |
||
| 57 | } |
||
| 58 | return (float) $output; |
||
| 59 | } |
||
| 60 | } |
||
| 61 |