@@ -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; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | __METHOD__ |
145 | 145 | ); |
146 | 146 | if (Craft::$app instanceof ConsoleApplication) { |
147 | - echo $msg . PHP_EOL; |
|
147 | + echo $msg.PHP_EOL; |
|
148 | 148 | } |
149 | 149 | if ($canManipulate) { |
150 | 150 | // Add the error message to the stickyErrors for the model |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $folder = $asset->getFolder(); |
216 | 216 | while ($folder !== null && !$createVariants) { |
217 | 217 | if ($folder->uid === $subfolder || $folder->name === $subfolder) { |
218 | - Craft::info('Matched subfolder uid: ' . print_r($subfolder, true), __METHOD__); |
|
218 | + Craft::info('Matched subfolder uid: '.print_r($subfolder, true), __METHOD__); |
|
219 | 219 | $createVariants = true; |
220 | 220 | } else { |
221 | 221 | $folder = $folder->getParent(); |
@@ -502,20 +502,20 @@ discard block |
||
502 | 502 | } |
503 | 503 | $useAspectRatio = $variant['useAspectRatio'] ?? false; |
504 | 504 | if ($useAspectRatio) { |
505 | - $aspectRatio = (float)$variant['aspectRatioX'] / (float)$variant['aspectRatioY']; |
|
505 | + $aspectRatio = (float) $variant['aspectRatioX'] / (float) $variant['aspectRatioY']; |
|
506 | 506 | } else { |
507 | - $aspectRatio = (float)$asset->width / (float)$asset->height; |
|
507 | + $aspectRatio = (float) $asset->width / (float) $asset->height; |
|
508 | 508 | } |
509 | - $width = (int)$variant['width'] * (int)$retinaSize; |
|
509 | + $width = (int) $variant['width'] * (int) $retinaSize; |
|
510 | 510 | $transform->width = $width; |
511 | - $transform->height = (int)($width / $aspectRatio); |
|
511 | + $transform->height = (int) ($width / $aspectRatio); |
|
512 | 512 | // Image quality |
513 | - $quality = (int)($variant['quality'] ?? null); |
|
513 | + $quality = (int) ($variant['quality'] ?? null); |
|
514 | 514 | if (empty($quality)) { |
515 | 515 | $quality = null; |
516 | 516 | } |
517 | 517 | if ($quality !== null && $settings->lowerQualityRetinaImageVariants && $retinaSize != '1') { |
518 | - $quality = (int)($quality * (1.5 / (int)$retinaSize)); |
|
518 | + $quality = (int) ($quality * (1.5 / (int) $retinaSize)); |
|
519 | 519 | } |
520 | 520 | $transform->quality = $quality; |
521 | 521 | // Interlaced (progressive JPEGs or interlaced PNGs) |