@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function run() |
152 | 152 | { |
153 | - $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image') . ' ' . $this->extraClass; |
|
153 | + $class = ($this->placeholderSrc ? 'lazyimage-wrapper' : 'lazy-image').' '.$this->extraClass; |
|
154 | 154 | |
155 | 155 | if ($this->placeholderSrc && $this->placeholderAsBase64) { |
156 | - $this->placeholderSrc = 'data:image/jpg;base64,' . base64_encode(file_get_contents($this->placeholderSrc)); |
|
156 | + $this->placeholderSrc = 'data:image/jpg;base64,'.base64_encode(file_get_contents($this->placeholderSrc)); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | if ($this->attributesOnly && !$this->placeholderSrc) { |
@@ -161,15 +161,15 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if ($this->placeholderSrc) { |
164 | - $tag = '<div class="' . $class . '">'; |
|
164 | + $tag = '<div class="'.$class.'">'; |
|
165 | 165 | $tag .= Html::tag('img', '', ['class' => 'lazy-image lazyimage', 'data-src' => $this->src]); |
166 | 166 | $tag .= Html::tag('img', '', ['class' => 'lazyimage-placeholder-image', 'src' => $this->placeholderSrc]); |
167 | - $tag .= '<noscript><img class="lazyimage-image" src="' . $this->src . '" /></noscript>'; |
|
167 | + $tag .= '<noscript><img class="lazyimage-image" src="'.$this->src.'" /></noscript>'; |
|
168 | 168 | $tag .= '</div>'; |
169 | 169 | } else { |
170 | 170 | $tag = Html::tag('img', '', ['class' => $class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height]); |
171 | 171 | if ($this->width && $this->height) { |
172 | - $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>'; |
|
172 | + $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>'; |
|
173 | 173 | } |
174 | 174 | $tag .= '<noscript><img class="'.$class.'" src="'.$this->src.'" /></noscript>'; |
175 | 175 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | return [ |
226 | 226 | 'module' => $this->module->id, |
227 | - 'route' => $this->module->id . '/' . $request['route'], |
|
227 | + 'route' => $this->module->id.'/'.$request['route'], |
|
228 | 228 | 'params' => $request['args'], |
229 | 229 | ]; |
230 | 230 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | throw new NotFoundHttpException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id)); |
246 | 246 | } |
247 | 247 | |
248 | - Yii::debug('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__); |
|
248 | + Yii::debug('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__); |
|
249 | 249 | |
250 | 250 | $this->controller = $controller[0]; |
251 | 251 | $originalController = Yii::$app->controller; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | * |
257 | 257 | * @see https://github.com/luyadev/luya/issues/1730 |
258 | 258 | */ |
259 | - $this->controller->on(Controller::EVENT_BEFORE_ACTION, function ($event) { |
|
259 | + $this->controller->on(Controller::EVENT_BEFORE_ACTION, function($event) { |
|
260 | 260 | Yii::$app->controller = $this->controller; |
261 | 261 | }); |
262 | 262 | /** |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | * |
265 | 265 | * @see https://github.com/luyadev/luya/issues/1768 |
266 | 266 | */ |
267 | - $this->controller->on(Controller::EVENT_AFTER_ACTION, function ($event) use ($originalController) { |
|
267 | + $this->controller->on(Controller::EVENT_AFTER_ACTION, function($event) use ($originalController) { |
|
268 | 268 | Yii::$app->controller = $originalController; |
269 | 269 | }); |
270 | 270 |