| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 23 | public function run($url) : Result |
||
| 24 | { |
||
| 25 | $process = $this->lighthouseProcess->getProcess($url); |
||
| 26 | |||
| 27 | $process->setTimeout(3600); |
||
| 28 | $process->run(); |
||
| 29 | if (!$process->isSuccessful()) { |
||
| 30 | throw new RuntimeException($process->getErrorOutput()); |
||
| 31 | } |
||
| 32 | |||
| 33 | $result = new Result(json_decode(file_get_contents($this->lighthouseProcess->getOutputPath()), true)); |
||
| 34 | $this->clearFiles(); |
||
| 35 | |||
| 36 | return $result; |
||
| 37 | } |
||
| 50 |