@@ -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,7 +787,7 @@ 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 | if (!empty($attrs['loading'])) { |
| 793 | 793 | $attrs['loading'] = 'lazy'; |
@@ -795,8 +795,8 @@ discard block |
||
| 795 | 795 | // Set the style on this element to be the placeholder image as the background-image |
| 796 | 796 | if (isset($attrs['style']) && !empty($attrs['src'])) { |
| 797 | 797 | $attrs['style'] = trim( |
| 798 | - $attrs['style'] . |
|
| 799 | - 'background-image:url(' . $this->getLazyLoadSrc($lazyLoad) . '); background-size: cover;' |
|
| 798 | + $attrs['style']. |
|
| 799 | + 'background-image:url('.$this->getLazyLoadSrc($lazyLoad).'); background-size: cover;' |
|
| 800 | 800 | ); |
| 801 | 801 | } |
| 802 | 802 | // Only swap to data- attributes if they want the LazySizes fallback |