@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | Event::on( |
| 317 | 317 | ClearCaches::class, |
| 318 | 318 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
| 319 | - function (RegisterCacheOptionsEvent $event) { |
|
| 319 | + function(RegisterCacheOptionsEvent $event) { |
|
| 320 | 320 | Craft::debug( |
| 321 | 321 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
| 322 | 322 | __METHOD__ |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | Event::on( |
| 333 | 333 | Plugins::class, |
| 334 | 334 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 335 | - function (PluginEvent $event) { |
|
| 335 | + function(PluginEvent $event) { |
|
| 336 | 336 | if ($event->plugin === $this) { |
| 337 | 337 | // Invalidate our caches after we've been installed |
| 338 | 338 | $this->clearAllCaches(); |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | Event::on( |
| 360 | 360 | CraftVariable::class, |
| 361 | 361 | CraftVariable::EVENT_INIT, |
| 362 | - function (Event $event) { |
|
| 362 | + function(Event $event) { |
|
| 363 | 363 | /** @var CraftVariable $variable */ |
| 364 | 364 | $variable = $event->sender; |
| 365 | 365 | $variable->set('retour', [ |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | } |
| 370 | 370 | ); |
| 371 | 371 | |
| 372 | - $prepareRedirectOnElementChange = function (ElementEvent $event) { |
|
| 372 | + $prepareRedirectOnElementChange = function(ElementEvent $event) { |
|
| 373 | 373 | /** @var Element $element */ |
| 374 | 374 | $element = $event->element; |
| 375 | 375 | if ($element !== null && !$event->isNew && $element->getUrl() !== null && !$element->propagating) { |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | } |
| 393 | 393 | }; |
| 394 | 394 | |
| 395 | - $insertRedirectOnElementChange = function (ElementEvent $event) { |
|
| 395 | + $insertRedirectOnElementChange = function(ElementEvent $event) { |
|
| 396 | 396 | /** @var Element $element */ |
| 397 | 397 | $element = $event->element; |
| 398 | 398 | if ($element !== null && !$event->isNew && $element->getUrl() !== null) { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | Event::on( |
| 411 | 411 | Elements::class, |
| 412 | 412 | Elements::EVENT_BEFORE_SAVE_ELEMENT, |
| 413 | - function (ElementEvent $event) use ($prepareRedirectOnElementChange){ |
|
| 413 | + function(ElementEvent $event) use ($prepareRedirectOnElementChange){ |
|
| 414 | 414 | Craft::debug( |
| 415 | 415 | 'Elements::EVENT_BEFORE_SAVE_ELEMENT', |
| 416 | 416 | __METHOD__ |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | Event::on( |
| 423 | 423 | Elements::class, |
| 424 | 424 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
| 425 | - function (ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 425 | + function(ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 426 | 426 | Craft::debug( |
| 427 | 427 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
| 428 | 428 | __METHOD__ |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | Event::on( |
| 435 | 435 | Elements::class, |
| 436 | 436 | Elements::EVENT_BEFORE_UPDATE_SLUG_AND_URI, |
| 437 | - function (ElementEvent $event) use ($prepareRedirectOnElementChange){ |
|
| 437 | + function(ElementEvent $event) use ($prepareRedirectOnElementChange){ |
|
| 438 | 438 | Craft::debug( |
| 439 | 439 | 'Elements::EVENT_BEFORE_UPDATE_SLUG_AND_URI', |
| 440 | 440 | __METHOD__ |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | Event::on( |
| 447 | 447 | Elements::class, |
| 448 | 448 | Elements::EVENT_AFTER_UPDATE_SLUG_AND_URI, |
| 449 | - function (ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 449 | + function(ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 450 | 450 | Craft::debug( |
| 451 | 451 | 'Elements::EVENT_AFTER_UPDATE_SLUG_AND_URI', |
| 452 | 452 | __METHOD__ |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | Event::on( |
| 460 | 460 | Plugins::class, |
| 461 | 461 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
| 462 | - function () { |
|
| 462 | + function() { |
|
| 463 | 463 | // Install these only after all other plugins have loaded |
| 464 | 464 | $request = Craft::$app->getRequest(); |
| 465 | 465 | // Only respond to non-console site requests |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | Event::on( |
| 477 | 477 | Fields::class, |
| 478 | 478 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 479 | - function (RegisterComponentTypesEvent $event) { |
|
| 479 | + function(RegisterComponentTypesEvent $event) { |
|
| 480 | 480 | $event->types[] = ShortLinkField::class; |
| 481 | 481 | } |
| 482 | 482 | ); |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | Event::on( |
| 486 | 486 | Gql::class, |
| 487 | 487 | Gql::EVENT_REGISTER_GQL_TYPES, |
| 488 | - function (RegisterGqlTypesEvent $event) { |
|
| 488 | + function(RegisterGqlTypesEvent $event) { |
|
| 489 | 489 | Craft::debug( |
| 490 | 490 | 'Gql::EVENT_REGISTER_GQL_TYPES', |
| 491 | 491 | __METHOD__ |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | Event::on( |
| 498 | 498 | Gql::class, |
| 499 | 499 | Gql::EVENT_REGISTER_GQL_QUERIES, |
| 500 | - function (RegisterGqlQueriesEvent $event) { |
|
| 500 | + function(RegisterGqlQueriesEvent $event) { |
|
| 501 | 501 | Craft::debug( |
| 502 | 502 | 'Gql::EVENT_REGISTER_GQL_QUERIES', |
| 503 | 503 | __METHOD__ |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | Event::on( |
| 514 | 514 | Gql::class, |
| 515 | 515 | Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS, |
| 516 | - function (RegisterGqlSchemaComponentsEvent $event) { |
|
| 516 | + function(RegisterGqlSchemaComponentsEvent $event) { |
|
| 517 | 517 | Craft::debug( |
| 518 | 518 | 'Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS', |
| 519 | 519 | __METHOD__ |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | Event::on( |
| 544 | 544 | UrlManager::class, |
| 545 | 545 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
| 546 | - function (RegisterUrlRulesEvent $event) { |
|
| 546 | + function(RegisterUrlRulesEvent $event) { |
|
| 547 | 547 | Craft::debug( |
| 548 | 548 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
| 549 | 549 | __METHOD__ |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | Event::on( |
| 567 | 567 | Dashboard::class, |
| 568 | 568 | Dashboard::EVENT_REGISTER_WIDGET_TYPES, |
| 569 | - function (RegisterComponentTypesEvent $event) { |
|
| 569 | + function(RegisterComponentTypesEvent $event) { |
|
| 570 | 570 | $event->types[] = RetourWidget::class; |
| 571 | 571 | } |
| 572 | 572 | ); |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | Event::on( |
| 575 | 575 | UrlManager::class, |
| 576 | 576 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
| 577 | - function (RegisterUrlRulesEvent $event) { |
|
| 577 | + function(RegisterUrlRulesEvent $event) { |
|
| 578 | 578 | Craft::debug( |
| 579 | 579 | 'UrlManager::EVENT_REGISTER_CP_URL_RULES', |
| 580 | 580 | __METHOD__ |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | Event::on( |
| 591 | 591 | UserPermissions::class, |
| 592 | 592 | UserPermissions::EVENT_REGISTER_PERMISSIONS, |
| 593 | - function (RegisterUserPermissionsEvent $event) { |
|
| 593 | + function(RegisterUserPermissionsEvent $event) { |
|
| 594 | 594 | Craft::debug( |
| 595 | 595 | 'UserPermissions::EVENT_REGISTER_PERMISSIONS', |
| 596 | 596 | __METHOD__ |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | Event::on( |
| 613 | 613 | ErrorHandler::class, |
| 614 | 614 | ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION, |
| 615 | - function (ExceptionEvent $event) { |
|
| 615 | + function(ExceptionEvent $event) { |
|
| 616 | 616 | Craft::debug( |
| 617 | 617 | 'ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION', |
| 618 | 618 | __METHOD__ |