| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 9 | class LighthouseClient |
||
| 10 | { |
||
| 11 | /** @var LightHouseProcess $lighthouseProcess */ |
||
| 12 | protected $lighthouseProcess; |
||
| 13 | |||
| 14 | public function __construct(array $options) |
||
| 15 | { |
||
| 16 | $this->lighthouseProcess = new LightHouseProcess($options); |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param $url |
||
| 21 | * @return Result|null |
||
| 22 | */ |
||
| 23 | public function run($url) : Result |
||
| 37 | } |
||
| 38 | |||
| 39 | protected function clearFiles(){ |
||
| 40 | if(is_file($this->lighthouseProcess->getOutputPath())) { |
||
| 41 | unlink($this->lighthouseProcess->getOutputPath()); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | public function __destruct() |
||
| 48 | } |
||
| 49 | } |
||
| 50 |