@@ -63,7 +63,7 @@ |
||
63 | 63 | array $params = [], |
64 | 64 | string $minifier = null |
65 | 65 | ): string { |
66 | - $template = 'image-optimize/' . $templatePath; |
|
66 | + $template = 'image-optimize/'.$templatePath; |
|
67 | 67 | $oldMode = Craft::$app->view->getTemplateMode(); |
68 | 68 | // Look for the template on the frontend first |
69 | 69 | try { |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | */ |
555 | 555 | public function getPlaceholderImage(): string |
556 | 556 | { |
557 | - return (string)$this->placeholderImage(); |
|
557 | + return (string) $this->placeholderImage(); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | /** |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | */ |
592 | 592 | public function getPlaceholderBox(string $color = null): string |
593 | 593 | { |
594 | - return (string)$this->placeholderBox($color); |
|
594 | + return (string) $this->placeholderBox($color); |
|
595 | 595 | } |
596 | 596 | |
597 | 597 | /** |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | */ |
633 | 633 | public function getPlaceholderSilhouette(): string |
634 | 634 | { |
635 | - return (string)$this->placeholderSilhouette(); |
|
635 | + return (string) $this->placeholderSilhouette(); |
|
636 | 636 | } |
637 | 637 | |
638 | 638 | /** |
@@ -744,10 +744,10 @@ discard block |
||
744 | 744 | foreach ($array as $key => $value) { |
745 | 745 | if ($dpr) { |
746 | 746 | $descriptor = '1x'; |
747 | - if (!empty($array[(int)$key / 2])) { |
|
747 | + if (!empty($array[(int) $key / 2])) { |
|
748 | 748 | $descriptor = '2x'; |
749 | 749 | } |
750 | - if (!empty($array[(int)$key / 3])) { |
|
750 | + if (!empty($array[(int) $key / 3])) { |
|
751 | 751 | $descriptor = '3x'; |
752 | 752 | } |
753 | 753 | } else { |
@@ -787,13 +787,13 @@ discard block |
||
787 | 787 | { |
788 | 788 | // Set the class and loading attributes |
789 | 789 | if (isset($attrs['class'])) { |
790 | - $attrs['class'] = trim($attrs['class'] . ' lazyload'); |
|
790 | + $attrs['class'] = trim($attrs['class'].' lazyload'); |
|
791 | 791 | } |
792 | 792 | // Set the style on this element to be the placeholder image as the background-image |
793 | 793 | if (isset($attrs['style']) && !empty($attrs['src'])) { |
794 | 794 | $attrs['style'] = trim( |
795 | - $attrs['style'] . |
|
796 | - 'background-image:url(' . $this->getLazyLoadSrc($placeHolder) . '); background-size: cover;' |
|
795 | + $attrs['style']. |
|
796 | + 'background-image:url('.$this->getLazyLoadSrc($placeHolder).'); background-size: cover;' |
|
797 | 797 | ); |
798 | 798 | } |
799 | 799 | // Handle attributes that lazy and lazySizesFallback have in common |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $vars, |
280 | 280 | $minifier |
281 | 281 | ); |
282 | - $content = (string)$content; |
|
282 | + $content = (string) $content; |
|
283 | 283 | if ($scriptAttrs !== null) { |
284 | 284 | $attrs = array_merge([ |
285 | 285 | ], |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $vars, |
315 | 315 | $minifier |
316 | 316 | ); |
317 | - $content = (string)$content; |
|
317 | + $content = (string) $content; |
|
318 | 318 | if ($scriptAttrs !== null) { |
319 | 319 | $attrs = array_merge([ |
320 | 320 | ], |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | if (!$asset->propagating) { |
211 | 211 | // If the scenario is Asset::SCENARIO_FILEOPS treat it as a new asset |
212 | 212 | $scenario = $asset->getScenario(); |
213 | - if ($isNew || $scenario === Asset::SCENARIO_FILEOPS ) { |
|
213 | + if ($isNew || $scenario === Asset::SCENARIO_FILEOPS) { |
|
214 | 214 | /** |
215 | 215 | * If this is a newly uploaded/created Asset, we can save the variants |
216 | 216 | * via a queue job to prevent it from blocking |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | 'vendors.css', |
327 | 327 | 'styles.css', |
328 | 328 | ]; |
329 | - foreach($cssModules as $cssModule) { |
|
329 | + foreach ($cssModules as $cssModule) { |
|
330 | 330 | $css = ManifestHelper::getModule(ManifestVariable::$config, $cssModule, 'legacy', true); |
331 | 331 | if ($css) { |
332 | 332 | Craft::$app->getView()->registerCssFile($css); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | 'vendors.css', |
398 | 398 | 'styles.css', |
399 | 399 | ]; |
400 | - foreach($cssModules as $cssModule) { |
|
400 | + foreach ($cssModules as $cssModule) { |
|
401 | 401 | $css = ManifestHelper::getModule(ManifestVariable::$config, $cssModule, 'legacy', true); |
402 | 402 | if ($css) { |
403 | 403 | Craft::$app->getView()->registerCssFile($css); |