| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 93.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class ImageResizer |
||
| 15 | { |
||
| 16 | private const CACHE_IMAGE_PATH = 'data/cache/images/'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var ImagineInterface |
||
| 20 | */ |
||
| 21 | private $imagine; |
||
| 22 | |||
| 23 | 18 | public function __construct(ImagineInterface $imagine) |
|
| 26 | 18 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Resize image as JPG or WEBP and return the path to the resized version |
||
| 30 | */ |
||
| 31 | 18 | public function resize(Image $image, int $maxHeight, bool $useWebp): string |
|
| 53 |