@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | /** |
| 138 | 138 | * @inheritdoc |
| 139 | 139 | */ |
| 140 | - public function getSettingsResponse(): TemplateResponseBehavior|Response |
|
| 140 | + public function getSettingsResponse(): TemplateResponseBehavior | Response |
|
| 141 | 141 | { |
| 142 | 142 | $view = Craft::$app->getView(); |
| 143 | 143 | $namespace = $view->getNamespace(); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | Event::on( |
| 237 | 237 | CraftVariable::class, |
| 238 | 238 | CraftVariable::EVENT_INIT, |
| 239 | - function (Event $event) { |
|
| 239 | + function(Event $event) { |
|
| 240 | 240 | /** @var CraftVariable $variable */ |
| 241 | 241 | $variable = $event->sender; |
| 242 | 242 | $variable->set('imageOptimize', [ |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | Event::on( |
| 251 | 251 | Fields::class, |
| 252 | 252 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 253 | - static function (RegisterComponentTypesEvent $event) { |
|
| 253 | + static function(RegisterComponentTypesEvent $event) { |
|
| 254 | 254 | Craft::debug( |
| 255 | 255 | 'Fields::EVENT_REGISTER_FIELD_TYPES', |
| 256 | 256 | __METHOD__ |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | Event::on( |
| 265 | 265 | Utilities::class, |
| 266 | 266 | Utilities::EVENT_REGISTER_UTILITY_TYPES, |
| 267 | - static function (RegisterComponentTypesEvent $event) { |
|
| 267 | + static function(RegisterComponentTypesEvent $event) { |
|
| 268 | 268 | $event->types[] = ImageOptimizeUtility::class; |
| 269 | 269 | } |
| 270 | 270 | ); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | Event::on( |
| 310 | 310 | Asset::class, |
| 311 | 311 | $eventName, |
| 312 | - static function (DefineAssetUrlEvent $event): void { |
|
| 312 | + static function(DefineAssetUrlEvent $event): void { |
|
| 313 | 313 | Craft::debug( |
| 314 | 314 | 'Asset::EVENT_DEFINE_URL', |
| 315 | 315 | __METHOD__ |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | Event::on( |
| 326 | 326 | Assets::class, |
| 327 | 327 | Assets::EVENT_DEFINE_THUMB_URL, |
| 328 | - static function (DefineAssetThumbUrlEvent $event): void { |
|
| 328 | + static function(DefineAssetThumbUrlEvent $event): void { |
|
| 329 | 329 | Craft::debug( |
| 330 | 330 | 'Assets::EVENT_DEFINE_THUMB_URL', |
| 331 | 331 | __METHOD__ |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | Event::on( |
| 342 | 342 | ImageTransformer::class, |
| 343 | 343 | ImageTransformer::EVENT_TRANSFORM_IMAGE, |
| 344 | - static function (ImageTransformerOperationEvent $event): void { |
|
| 344 | + static function(ImageTransformerOperationEvent $event): void { |
|
| 345 | 345 | Craft::debug( |
| 346 | 346 | 'ImageTransformer::EVENT_TRANSFORM_IMAGE', |
| 347 | 347 | __METHOD__ |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | Event::on( |
| 361 | 361 | ImageTransformer::class, |
| 362 | 362 | ImageTransformer::EVENT_DELETE_TRANSFORMED_IMAGE, |
| 363 | - static function (ImageTransformerOperationEvent $event): void { |
|
| 363 | + static function(ImageTransformerOperationEvent $event): void { |
|
| 364 | 364 | Craft::debug( |
| 365 | 365 | 'ImageTransformer::EVENT_DELETE_TRANSFORMED_IMAGE', |
| 366 | 366 | __METHOD__ |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | Event::on( |
| 377 | 377 | Assets::class, |
| 378 | 378 | Assets::EVENT_BEFORE_REPLACE_ASSET, |
| 379 | - static function (ReplaceAssetEvent $event) { |
|
| 379 | + static function(ReplaceAssetEvent $event) { |
|
| 380 | 380 | Craft::debug( |
| 381 | 381 | 'Assets::EVENT_BEFORE_REPLACE_ASSET', |
| 382 | 382 | __METHOD__ |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | Event::on( |
| 395 | 395 | Assets::class, |
| 396 | 396 | Assets::EVENT_AFTER_REPLACE_ASSET, |
| 397 | - static function (ReplaceAssetEvent $event) { |
|
| 397 | + static function(ReplaceAssetEvent $event) { |
|
| 398 | 398 | Craft::debug( |
| 399 | 399 | 'Assets::EVENT_AFTER_REPLACE_ASSET', |
| 400 | 400 | __METHOD__ |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | Event::on( |
| 417 | 417 | Assets::class, |
| 418 | 418 | Elements::EVENT_BEFORE_SAVE_ELEMENT, |
| 419 | - static function (ElementEvent $event) { |
|
| 419 | + static function(ElementEvent $event) { |
|
| 420 | 420 | Craft::debug( |
| 421 | 421 | 'Elements::EVENT_BEFORE_SAVE_ELEMENT', |
| 422 | 422 | __METHOD__ |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | Event::on( |
| 438 | 438 | Asset::class, |
| 439 | 439 | Elements::EVENT_BEFORE_DELETE_ELEMENT, |
| 440 | - static function (ElementEvent $event) { |
|
| 440 | + static function(ElementEvent $event) { |
|
| 441 | 441 | Craft::debug( |
| 442 | 442 | 'Elements::EVENT_BEFORE_DELETE_ELEMENT', |
| 443 | 443 | __METHOD__ |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | Event::on( |
| 463 | 463 | Fields::class, |
| 464 | 464 | Fields::EVENT_AFTER_SAVE_FIELD, |
| 465 | - function (FieldEvent $event) { |
|
| 465 | + function(FieldEvent $event) { |
|
| 466 | 466 | Craft::debug( |
| 467 | 467 | 'Fields::EVENT_AFTER_SAVE_FIELD', |
| 468 | 468 | __METHOD__ |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | Event::on( |
| 481 | 481 | Plugins::class, |
| 482 | 482 | Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS, |
| 483 | - function (PluginEvent $event) { |
|
| 483 | + function(PluginEvent $event) { |
|
| 484 | 484 | if ($event->plugin === $this) { |
| 485 | 485 | Craft::debug( |
| 486 | 486 | 'Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS', |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | Event::on( |
| 501 | 501 | Volumes::class, |
| 502 | 502 | Volumes::EVENT_AFTER_SAVE_VOLUME, |
| 503 | - function (VolumeEvent $event) { |
|
| 503 | + function(VolumeEvent $event) { |
|
| 504 | 504 | Craft::debug( |
| 505 | 505 | 'Volumes::EVENT_AFTER_SAVE_VOLUME', |
| 506 | 506 | __METHOD__ |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | Event::on( |
| 520 | 520 | Plugins::class, |
| 521 | 521 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 522 | - function (PluginEvent $event) { |
|
| 522 | + function(PluginEvent $event) { |
|
| 523 | 523 | if ($event->plugin === $this) { |
| 524 | 524 | $request = Craft::$app->getRequest(); |
| 525 | 525 | if ($request->isCpRequest) { |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | Event::on( |
| 540 | 540 | UrlManager::class, |
| 541 | 541 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
| 542 | - function (RegisterUrlRulesEvent $event) { |
|
| 542 | + function(RegisterUrlRulesEvent $event) { |
|
| 543 | 543 | Craft::debug( |
| 544 | 544 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
| 545 | 545 | __METHOD__ |
@@ -562,12 +562,12 @@ discard block |
||
| 562 | 562 | Event::on( |
| 563 | 563 | Plugins::class, |
| 564 | 564 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
| 565 | - static function () { |
|
| 565 | + static function() { |
|
| 566 | 566 | // Install these only after all other plugins have loaded |
| 567 | 567 | Event::on( |
| 568 | 568 | View::class, |
| 569 | 569 | View::EVENT_REGISTER_CP_TEMPLATE_ROOTS, |
| 570 | - static function (RegisterTemplateRootsEvent $e) { |
|
| 570 | + static function(RegisterTemplateRootsEvent $e) { |
|
| 571 | 571 | // Register the root directodies |
| 572 | 572 | $allImageTransformTypes = ImageOptimize::$plugin->optimize->getAllImageTransformTypes(); |
| 573 | 573 | /** @var ImageTransformInterface $imageTransformType */ |