| Conditions | 8 |
| Paths | 12 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function finalizeParams() |
||
| 10 | { |
||
| 11 | if ($this->format) { |
||
| 12 | $this->params['output'] = $this->format; |
||
| 13 | } |
||
| 14 | |||
| 15 | if ($this->quality) { |
||
| 16 | $this->params['quality'] = $this->quality; |
||
| 17 | } |
||
| 18 | |||
| 19 | if ($this->width || $this->height) { |
||
| 20 | $this->width = $this->width ?: '-'; |
||
| 21 | $this->height = $this->height ?: '-'; |
||
| 22 | |||
| 23 | if ($this->cropFit) { |
||
| 24 | $this->params['crop'] = "{$this->width}x{$this->height}"; |
||
| 25 | } else { |
||
| 26 | $this->params['resize'] = "{$this->width}x{$this->height}"; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | return $this->params; |
||
| 31 | } |
||
| 48 |