| Conditions | 3 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function compressFile(\SplFileInfo $input, \SplFileInfo $output, bool $overwrite = true): void |
||
| 31 | { |
||
| 32 | if (!$overwrite && $output->isFile()) { |
||
| 33 | throw new \RuntimeException('The file '.$output->getPathname().' already exists and the overwrite option is false'); |
||
| 34 | } |
||
| 35 | |||
| 36 | \Tinify\fromFile($input->getPathname())->toFile($output->getPathname()); |
||
| 37 | } |
||
| 39 |