| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function getCommand(): string |
||
| 17 | { |
||
| 18 | $optionString = implode(' ', $this->options); |
||
| 19 | // Directly overwriting of file is not possible, so do a mv after compression |
||
| 20 | return "{$this->binaryName} {$optionString}" |
||
| 21 | .' -outfile '.escapeshellarg($this->imagePath.'optimized.jpg') |
||
| 22 | .' '.escapeshellarg($this->imagePath).' && mv '.escapeshellarg($this->imagePath.'optimized.jpg') |
||
| 23 | .' '.escapeshellarg($this->imagePath); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |