@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $index->fileExists = 0; |
112 | 112 | $transforms->storeTransformIndexData($index); |
113 | 113 | $volume = $asset->getVolume(); |
114 | - $transformPath = $asset->folderPath . $transforms->getTransformSubpath($asset, $index); |
|
114 | + $transformPath = $asset->folderPath.$transforms->getTransformSubpath($asset, $index); |
|
115 | 115 | try { |
116 | 116 | $volume->deleteFile($transformPath); |
117 | 117 | } catch (\Throwable $exception) { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $msg = 'Failed to update transform: '.$e->getMessage(); |
121 | 121 | Craft::error($msg, __METHOD__); |
122 | 122 | if (Craft::$app instanceof ConsoleApplication) { |
123 | - echo $msg . PHP_EOL; |
|
123 | + echo $msg.PHP_EOL; |
|
124 | 124 | } |
125 | 125 | // Add the error message to the stickyErrors for the model |
126 | 126 | $model->stickyErrors[] = $msg; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | __METHOD__ |
144 | 144 | ); |
145 | 145 | if (Craft::$app instanceof ConsoleApplication) { |
146 | - echo $msg . PHP_EOL; |
|
146 | + echo $msg.PHP_EOL; |
|
147 | 147 | } |
148 | 148 | // Add the error message to the stickyErrors for the model |
149 | 149 | $model->stickyErrors[] = $msg; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $folder = $asset->getFolder(); |
210 | 210 | while ($folder !== null && !$createVariants) { |
211 | 211 | if ($folder->uid === $subfolder) { |
212 | - Craft::info('Matched subfolder uid: ' . print_r($subfolder, true), __METHOD__); |
|
212 | + Craft::info('Matched subfolder uid: '.print_r($subfolder, true), __METHOD__); |
|
213 | 213 | $createVariants = true; |
214 | 214 | } else { |
215 | 215 | $folder = $folder->getParent(); |
@@ -491,20 +491,20 @@ discard block |
||
491 | 491 | } |
492 | 492 | $useAspectRatio = $variant['useAspectRatio'] ?? false; |
493 | 493 | if ($useAspectRatio) { |
494 | - $aspectRatio = (float)$variant['aspectRatioX'] / (float)$variant['aspectRatioY']; |
|
494 | + $aspectRatio = (float) $variant['aspectRatioX'] / (float) $variant['aspectRatioY']; |
|
495 | 495 | } else { |
496 | - $aspectRatio = (float)$asset->width / (float)$asset->height; |
|
496 | + $aspectRatio = (float) $asset->width / (float) $asset->height; |
|
497 | 497 | } |
498 | - $width = (int)$variant['width'] * (int)$retinaSize; |
|
498 | + $width = (int) $variant['width'] * (int) $retinaSize; |
|
499 | 499 | $transform->width = $width; |
500 | - $transform->height = (int)($width / $aspectRatio); |
|
500 | + $transform->height = (int) ($width / $aspectRatio); |
|
501 | 501 | // Image quality |
502 | - $quality = (int)($variant['quality'] ?? null); |
|
502 | + $quality = (int) ($variant['quality'] ?? null); |
|
503 | 503 | if (empty($quality)) { |
504 | 504 | $quality = null; |
505 | 505 | } |
506 | 506 | if ($quality !== null && $settings->lowerQualityRetinaImageVariants && $retinaSize != '1') { |
507 | - $quality = (int)($quality * (1.5 / (int)$retinaSize)); |
|
507 | + $quality = (int) ($quality * (1.5 / (int) $retinaSize)); |
|
508 | 508 | } |
509 | 509 | $transform->quality = $quality; |
510 | 510 | // Interlaced (progressive JPEGs or interlaced PNGs) |