@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $folder = $asset->getFolder(); |
171 | 171 | while ($folder !== null && !$createVariants) { |
172 | 172 | if ($folder->uid === $subfolder) { |
173 | - Craft::info('Matched subfolder uid: ' . print_r($subfolder, true), __METHOD__); |
|
173 | + Craft::info('Matched subfolder uid: '.print_r($subfolder, true), __METHOD__); |
|
174 | 174 | $createVariants = true; |
175 | 175 | } else { |
176 | 176 | $folder = $folder->getParent(); |
@@ -437,20 +437,20 @@ discard block |
||
437 | 437 | } |
438 | 438 | $useAspectRatio = $variant['useAspectRatio'] ?? false; |
439 | 439 | if ($useAspectRatio) { |
440 | - $aspectRatio = (int)$variant['aspectRatioX'] / (int)$variant['aspectRatioY']; |
|
440 | + $aspectRatio = (int) $variant['aspectRatioX'] / (int) $variant['aspectRatioY']; |
|
441 | 441 | } else { |
442 | - $aspectRatio = (int)$asset->width / (int)$asset->height; |
|
442 | + $aspectRatio = (int) $asset->width / (int) $asset->height; |
|
443 | 443 | } |
444 | - $width = (int)$variant['width'] * (int)$retinaSize; |
|
444 | + $width = (int) $variant['width'] * (int) $retinaSize; |
|
445 | 445 | $transform->width = $width; |
446 | - $transform->height = (int)($width / $aspectRatio); |
|
446 | + $transform->height = (int) ($width / $aspectRatio); |
|
447 | 447 | // Image quality |
448 | - $quality = (int)($variant['quality'] ?? null); |
|
448 | + $quality = (int) ($variant['quality'] ?? null); |
|
449 | 449 | if (empty($quality)) { |
450 | 450 | $quality = null; |
451 | 451 | } |
452 | 452 | if ($quality !== null && $settings->lowerQualityRetinaImageVariants && $retinaSize != '1') { |
453 | - $quality = (int)($quality * (1.5 / (int)$retinaSize)); |
|
453 | + $quality = (int) ($quality * (1.5 / (int) $retinaSize)); |
|
454 | 454 | } |
455 | 455 | $transform->quality = $quality; |
456 | 456 | // Interlaced (progressive JPEGs or interlaced PNGs) |