@@ -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__ |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | Event::on( |
| 260 | 260 | Plugins::class, |
| 261 | 261 | Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS, |
| 262 | - function (PluginEvent $event) { |
|
| 262 | + function(PluginEvent $event) { |
|
| 263 | 263 | if ($event->plugin === $this) { |
| 264 | 264 | Craft::debug( |
| 265 | 265 | 'Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS', |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | Event::on( |
| 279 | 279 | Volumes::class, |
| 280 | 280 | Volumes::EVENT_AFTER_SAVE_VOLUME, |
| 281 | - function (VolumeEvent $event) { |
|
| 281 | + function(VolumeEvent $event) { |
|
| 282 | 282 | Craft::debug( |
| 283 | 283 | 'Volumes::EVENT_AFTER_SAVE_VOLUME', |
| 284 | 284 | __METHOD__ |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | Event::on( |
| 300 | 300 | Plugins::class, |
| 301 | 301 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 302 | - function (PluginEvent $event) { |
|
| 302 | + function(PluginEvent $event) { |
|
| 303 | 303 | if ($event->plugin === $this) { |
| 304 | 304 | $request = Craft::$app->getRequest(); |
| 305 | 305 | if (($request->isCpRequest) && (!$request->isConsoleRequest)) { |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | Event::on( |
| 321 | 321 | Assets::class, |
| 322 | 322 | Assets::EVENT_GET_ASSET_URL, |
| 323 | - function (GetAssetUrlEvent $event) { |
|
| 323 | + function(GetAssetUrlEvent $event) { |
|
| 324 | 324 | Craft::debug( |
| 325 | 325 | 'Assets::EVENT_GET_ASSET_URL', |
| 326 | 326 | __METHOD__ |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | Event::on( |
| 337 | 337 | AssetTransforms::class, |
| 338 | 338 | AssetTransforms::EVENT_GENERATE_TRANSFORM, |
| 339 | - function (GenerateTransformEvent $event) { |
|
| 339 | + function(GenerateTransformEvent $event) { |
|
| 340 | 340 | Craft::debug( |
| 341 | 341 | 'AssetTransforms::EVENT_GENERATE_TRANSFORM', |
| 342 | 342 | __METHOD__ |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | Event::on( |
| 353 | 353 | AssetTransforms::class, |
| 354 | 354 | AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS, |
| 355 | - function (AssetTransformImageEvent $event) { |
|
| 355 | + function(AssetTransformImageEvent $event) { |
|
| 356 | 356 | Craft::debug( |
| 357 | 357 | 'AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS', |
| 358 | 358 | __METHOD__ |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | Event::on( |
| 369 | 369 | Assets::class, |
| 370 | 370 | Assets::EVENT_BEFORE_REPLACE_ASSET, |
| 371 | - function (ReplaceAssetEvent $event) { |
|
| 371 | + function(ReplaceAssetEvent $event) { |
|
| 372 | 372 | Craft::debug( |
| 373 | 373 | 'Assets::EVENT_BEFORE_REPLACE_ASSET', |
| 374 | 374 | __METHOD__ |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | Event::on( |
| 391 | 391 | Assets::class, |
| 392 | 392 | Assets::EVENT_AFTER_REPLACE_ASSET, |
| 393 | - function (ReplaceAssetEvent $event) { |
|
| 393 | + function(ReplaceAssetEvent $event) { |
|
| 394 | 394 | Craft::debug( |
| 395 | 395 | 'Assets::EVENT_AFTER_REPLACE_ASSET', |
| 396 | 396 | __METHOD__ |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | Event::on( |
| 414 | 414 | Assets::class, |
| 415 | 415 | Elements::EVENT_BEFORE_SAVE_ELEMENT, |
| 416 | - function (ElementEvent $event) { |
|
| 416 | + function(ElementEvent $event) { |
|
| 417 | 417 | Craft::debug( |
| 418 | 418 | 'Elements::EVENT_BEFORE_SAVE_ELEMENT', |
| 419 | 419 | __METHOD__ |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | Event::on( |
| 439 | 439 | Asset::class, |
| 440 | 440 | Elements::EVENT_BEFORE_DELETE_ELEMENT, |
| 441 | - function (ElementEvent $event) { |
|
| 441 | + function(ElementEvent $event) { |
|
| 442 | 442 | Craft::debug( |
| 443 | 443 | 'Elements::EVENT_BEFORE_DELETE_ELEMENT', |
| 444 | 444 | __METHOD__ |