@@ -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 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | return [ |
| 218 | 218 | 'module' => $this->module->id, |
| 219 | - 'route' => $this->module->id . '/' . $request['route'], |
|
| 219 | + 'route' => $this->module->id.'/'.$request['route'], |
|
| 220 | 220 | 'params' => $request['originalArgs'], |
| 221 | 221 | ]; |
| 222 | 222 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | throw new NotFoundHttpException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id)); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | - Yii::debug('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__); |
|
| 240 | + Yii::debug('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__); |
|
| 241 | 241 | |
| 242 | 242 | $this->controller = $controller[0]; |
| 243 | 243 | $originalController = Yii::$app->controller; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * |
| 249 | 249 | * @see https://github.com/luyadev/luya/issues/1730 |
| 250 | 250 | */ |
| 251 | - $this->controller->on(Controller::EVENT_BEFORE_ACTION, function ($event) { |
|
| 251 | + $this->controller->on(Controller::EVENT_BEFORE_ACTION, function($event) { |
|
| 252 | 252 | Yii::$app->controller = $this->controller; |
| 253 | 253 | }); |
| 254 | 254 | /** |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | * |
| 257 | 257 | * @see https://github.com/luyadev/luya/issues/1768 |
| 258 | 258 | */ |
| 259 | - $this->controller->on(Controller::EVENT_AFTER_ACTION, function ($event) use ($originalController) { |
|
| 259 | + $this->controller->on(Controller::EVENT_AFTER_ACTION, function($event) use ($originalController) { |
|
| 260 | 260 | Yii::$app->controller = $originalController; |
| 261 | 261 | }); |
| 262 | 262 | |