| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 1 | public function extract(string $filename): array |
|
| 32 | { |
||
| 33 | 1 | $shellExec = ShellExec::run($this->buildCommand($filename)); |
|
| 34 | 1 | if (0 !== $shellExec->exitStatus()) { |
|
| 35 | throw new \RuntimeException("Running pdftotext exit with error (exit status: {$shellExec->exitStatus()})"); |
||
| 36 | } |
||
| 37 | 1 | return $shellExec->output(); |
|
| 38 | } |
||
| 39 | |||
| 45 |