@@ -157,10 +157,10 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function run() |
159 | 159 | { |
160 | - $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image') . ' ' . $this->extraClass; |
|
160 | + $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image').' '.$this->extraClass; |
|
161 | 161 | |
162 | 162 | if ($this->placeholderSrc && $this->placeholderAsBase64) { |
163 | - $this->placeholderSrc = 'data:image/jpg;base64,' . base64_encode(file_get_contents($this->placeholderSrc)); |
|
163 | + $this->placeholderSrc = 'data:image/jpg;base64,'.base64_encode(file_get_contents($this->placeholderSrc)); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | if ($this->attributesOnly && !$this->placeholderSrc) { |
@@ -168,15 +168,15 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | if ($this->placeholderSrc) { |
171 | - $tag = '<div class="' . $class . '">'; |
|
171 | + $tag = '<div class="'.$class.'">'; |
|
172 | 172 | $tag .= Html::tag('img', '', array_merge($this->options, ['class' => 'lazy-image lazyimage', 'data-src' => $this->src])); |
173 | 173 | $tag .= Html::tag('img', '', ['class' => 'lazyimage-placeholder-image', 'src' => $this->placeholderSrc]); |
174 | - $tag .= '<noscript><img class="lazyimage-image" src="' . $this->src . '" /></noscript>'; |
|
174 | + $tag .= '<noscript><img class="lazyimage-image" src="'.$this->src.'" /></noscript>'; |
|
175 | 175 | $tag .= '</div>'; |
176 | 176 | } else { |
177 | 177 | $tag = Html::tag('img', '', array_merge($this->options, ['class' => $class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height])); |
178 | 178 | if ($this->width && $this->height) { |
179 | - $tag .= '<div class="lazy-placeholder ' . $class .'"><div style="display: block; height: 0px; padding-bottom: ' . ($this->height / $this->width) * 100 . '%;"></div><div class="loader"></div></div>'; |
|
179 | + $tag .= '<div class="lazy-placeholder '.$class.'"><div style="display: block; height: 0px; padding-bottom: '.($this->height / $this->width) * 100.'%;"></div><div class="loader"></div></div>'; |
|
180 | 180 | } |
181 | 181 | $tag .= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>'; |
182 | 182 | } |