@@ -118,7 +118,7 @@ |
||
| 118 | 118 | if (Image::canManipulateAsImage($finalFormat) |
| 119 | 119 | && Image::canManipulateAsImage($finalFormat) |
| 120 | 120 | && $asset->height > 0) { |
| 121 | - $variant = [ |
|
| 121 | + $variant = [ |
|
| 122 | 122 | 'width' => $asset->width, |
| 123 | 123 | 'useAspectRatio' => false, |
| 124 | 124 | 'aspectRatioX' => $asset->width, |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | // It takes a bit of time, so if you never plan to use it, you can turn it off |
| 54 | 54 | 'createColorPalette' => true, |
| 55 | 55 | |
| 56 | - // Controls whether SVG placeholder silhouettes should be created for image variants |
|
| 57 | - // It takes a bit of time, so if you never plan to use them, you can turn it off |
|
| 56 | + // Controls whether SVG placeholder silhouettes should be created for image variants |
|
| 57 | + // It takes a bit of time, so if you never plan to use them, you can turn it off |
|
| 58 | 58 | 'createPlaceholderSilhouettes' => true, |
| 59 | 59 | |
| 60 | 60 | // Controls whether retina images are automatically created with reduced quality |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | return $this->defaultPlaceholderImage(); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | - return Template::raw($header . rawurlencode($content)); |
|
| 293 | + return Template::raw($header.rawurlencode($content)); |
|
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | /** |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | return $this->defaultPlaceholderImage(); |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | - return Template::raw($header . $content); |
|
| 348 | + return Template::raw($header.$content); |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /** |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | break; |
| 455 | 455 | } |
| 456 | 456 | if ($match) { |
| 457 | - $subset+= array_slice($set, $index, 1, true); |
|
| 457 | + $subset += array_slice($set, $index, 1, true); |
|
| 458 | 458 | } |
| 459 | 459 | $index++; |
| 460 | 460 | } |
@@ -482,9 +482,9 @@ discard block |
||
| 482 | 482 | $descriptor = '3x'; |
| 483 | 483 | } |
| 484 | 484 | } else { |
| 485 | - $descriptor = $key . 'w'; |
|
| 485 | + $descriptor = $key.'w'; |
|
| 486 | 486 | } |
| 487 | - $srcset .= $value . ' ' . $descriptor . ', '; |
|
| 487 | + $srcset .= $value.' '.$descriptor.', '; |
|
| 488 | 488 | } |
| 489 | 489 | $srcset = rtrim($srcset, ', '); |
| 490 | 490 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | Event::on( |
| 182 | 182 | CraftVariable::class, |
| 183 | 183 | CraftVariable::EVENT_INIT, |
| 184 | - function (Event $event) { |
|
| 184 | + function(Event $event) { |
|
| 185 | 185 | /** @var CraftVariable $variable */ |
| 186 | 186 | $variable = $event->sender; |
| 187 | 187 | $variable->set('imageOptimize', ImageOptimizeVariable::class); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | Event::on( |
| 193 | 193 | Fields::class, |
| 194 | 194 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 195 | - function (RegisterComponentTypesEvent $event) { |
|
| 195 | + function(RegisterComponentTypesEvent $event) { |
|
| 196 | 196 | Craft::debug( |
| 197 | 197 | 'Fields::EVENT_REGISTER_FIELD_TYPES', |
| 198 | 198 | __METHOD__ |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | Event::on( |
| 222 | 222 | Fields::class, |
| 223 | 223 | Fields::EVENT_AFTER_SAVE_FIELD, |
| 224 | - function (FieldEvent $event) { |
|
| 224 | + function(FieldEvent $event) { |
|
| 225 | 225 | Craft::debug( |
| 226 | 226 | 'Fields::EVENT_AFTER_SAVE_FIELD', |
| 227 | 227 | __METHOD__ |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | Event::on( |
| 239 | 239 | Plugins::class, |
| 240 | 240 | Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS, |
| 241 | - function (PluginEvent $event) { |
|
| 241 | + function(PluginEvent $event) { |
|
| 242 | 242 | if ($event->plugin === $this) { |
| 243 | 243 | Craft::debug( |
| 244 | 244 | 'Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS', |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | Event::on( |
| 258 | 258 | Volumes::class, |
| 259 | 259 | Volumes::EVENT_AFTER_SAVE_VOLUME, |
| 260 | - function (VolumeEvent $event) { |
|
| 260 | + function(VolumeEvent $event) { |
|
| 261 | 261 | Craft::debug( |
| 262 | 262 | 'Volumes::EVENT_AFTER_SAVE_VOLUME', |
| 263 | 263 | __METHOD__ |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | Event::on( |
| 276 | 276 | Plugins::class, |
| 277 | 277 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 278 | - function (PluginEvent $event) { |
|
| 278 | + function(PluginEvent $event) { |
|
| 279 | 279 | if ($event->plugin === $this) { |
| 280 | 280 | $request = Craft::$app->getRequest(); |
| 281 | 281 | if ($request->isCpRequest) { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | Event::on( |
| 296 | 296 | Assets::class, |
| 297 | 297 | Assets::EVENT_GET_ASSET_URL, |
| 298 | - function (GetAssetUrlEvent $event) { |
|
| 298 | + function(GetAssetUrlEvent $event) { |
|
| 299 | 299 | Craft::debug( |
| 300 | 300 | 'Assets::EVENT_GET_ASSET_URL', |
| 301 | 301 | __METHOD__ |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | Event::on( |
| 312 | 312 | AssetTransforms::class, |
| 313 | 313 | AssetTransforms::EVENT_GENERATE_TRANSFORM, |
| 314 | - function (GenerateTransformEvent $event) { |
|
| 314 | + function(GenerateTransformEvent $event) { |
|
| 315 | 315 | Craft::debug( |
| 316 | 316 | 'AssetTransforms::EVENT_GENERATE_TRANSFORM', |
| 317 | 317 | __METHOD__ |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | Event::on( |
| 328 | 328 | AssetTransforms::class, |
| 329 | 329 | AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS, |
| 330 | - function (AssetTransformImageEvent $event) { |
|
| 330 | + function(AssetTransformImageEvent $event) { |
|
| 331 | 331 | Craft::debug( |
| 332 | 332 | 'AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS', |
| 333 | 333 | __METHOD__ |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | Event::on( |
| 344 | 344 | Assets::class, |
| 345 | 345 | Assets::EVENT_BEFORE_REPLACE_ASSET, |
| 346 | - function (ReplaceAssetEvent $event) { |
|
| 346 | + function(ReplaceAssetEvent $event) { |
|
| 347 | 347 | Craft::debug( |
| 348 | 348 | 'Assets::EVENT_BEFORE_REPLACE_ASSET', |
| 349 | 349 | __METHOD__ |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | Event::on( |
| 366 | 366 | Assets::class, |
| 367 | 367 | Assets::EVENT_AFTER_REPLACE_ASSET, |
| 368 | - function (ReplaceAssetEvent $event) { |
|
| 368 | + function(ReplaceAssetEvent $event) { |
|
| 369 | 369 | Craft::debug( |
| 370 | 370 | 'Assets::EVENT_AFTER_REPLACE_ASSET', |
| 371 | 371 | __METHOD__ |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | Event::on( |
| 389 | 389 | Assets::class, |
| 390 | 390 | Elements::EVENT_BEFORE_SAVE_ELEMENT, |
| 391 | - function (ElementEvent $event) { |
|
| 391 | + function(ElementEvent $event) { |
|
| 392 | 392 | Craft::debug( |
| 393 | 393 | 'Elements::EVENT_BEFORE_SAVE_ELEMENT', |
| 394 | 394 | __METHOD__ |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | Event::on( |
| 413 | 413 | Asset::class, |
| 414 | 414 | Elements::EVENT_BEFORE_DELETE_ELEMENT, |
| 415 | - function (ElementEvent $event) { |
|
| 415 | + function(ElementEvent $event) { |
|
| 416 | 416 | Craft::debug( |
| 417 | 417 | 'Elements::EVENT_BEFORE_DELETE_ELEMENT', |
| 418 | 418 | __METHOD__ |