| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function scale(SplFileInfo $sourceFile, Image $imageObject) : array { |
||
| 19 | $width = $imageObject->getWidth(); |
||
| 20 | $height = $imageObject->getHeight(); |
||
| 21 | |||
| 22 | $sizes = []; |
||
| 23 | while ($width >= $this->minWidth) { |
||
| 24 | $width = floor($width * $this->stepModifier); |
||
| 25 | $height = floor($height * $this->stepModifier); |
||
| 26 | |||
| 27 | $sizes[(int) $width] = $height; |
||
| 28 | } |
||
| 29 | |||
| 30 | return $sizes; |
||
| 31 | } |
||
| 32 | } |
||
| 33 |