@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | self::$cacheDuration = self::$devMode |
309 | 309 | ? self::DEVMODE_CACHE_DURATION |
310 | 310 | : self::$settings->metaCacheDuration ?? null; |
311 | - self::$cacheDuration = self::$cacheDuration === null ? null : (int)self::$cacheDuration; |
|
311 | + self::$cacheDuration = self::$cacheDuration === null ? null : (int) self::$cacheDuration; |
|
312 | 312 | self::$environment = EnvironmentHelper::determineEnvironment(); |
313 | 313 | MetaValueHelper::cache(); |
314 | 314 | // Version helpers |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | Event::on( |
506 | 506 | Plugins::class, |
507 | 507 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
508 | - function (PluginEvent $event) { |
|
508 | + function(PluginEvent $event) { |
|
509 | 509 | if ($event->plugin === $this) { |
510 | 510 | // Invalidate our caches after we've been installed |
511 | 511 | $this->clearAllCaches(); |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | Event::on( |
527 | 527 | ClearCaches::class, |
528 | 528 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
529 | - function (RegisterCacheOptionsEvent $event) { |
|
529 | + function(RegisterCacheOptionsEvent $event) { |
|
530 | 530 | Craft::debug( |
531 | 531 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
532 | 532 | __METHOD__ |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | Event::on( |
543 | 543 | Plugins::class, |
544 | 544 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, |
545 | - function (PluginEvent $event) { |
|
545 | + function(PluginEvent $event) { |
|
546 | 546 | if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { |
547 | 547 | // For all the emojis |
548 | 548 | $settingsModel = $this->getSettings(); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | Event::on( |
573 | 573 | Plugins::class, |
574 | 574 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
575 | - function () { |
|
575 | + function() { |
|
576 | 576 | // Install these only after all other plugins have loaded |
577 | 577 | $request = Craft::$app->getRequest(); |
578 | 578 | // Allow the SeoElements to register their own event handlers |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | Event::on( |
592 | 592 | Fields::class, |
593 | 593 | Fields::EVENT_REGISTER_FIELD_TYPES, |
594 | - function (RegisterComponentTypesEvent $event) { |
|
594 | + function(RegisterComponentTypesEvent $event) { |
|
595 | 595 | $event->types[] = SeoSettingsField::class; |
596 | 596 | $event->types[] = Seomatic_MetaField::class; |
597 | 597 | } |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | Event::on( |
601 | 601 | Elements::class, |
602 | 602 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
603 | - function (ElementEvent $event) { |
|
603 | + function(ElementEvent $event) { |
|
604 | 604 | Craft::debug( |
605 | 605 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
606 | 606 | __METHOD__ |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | Event::on( |
621 | 621 | Elements::class, |
622 | 622 | Elements::EVENT_AFTER_DELETE_ELEMENT, |
623 | - function (ElementEvent $event) { |
|
623 | + function(ElementEvent $event) { |
|
624 | 624 | Craft::debug( |
625 | 625 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', |
626 | 626 | __METHOD__ |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | Event::on( |
640 | 640 | Entry::class, |
641 | 641 | Entry::EVENT_REGISTER_PREVIEW_TARGETS, |
642 | - function (RegisterPreviewTargetsEvent $e) { |
|
642 | + function(RegisterPreviewTargetsEvent $e) { |
|
643 | 643 | /** @var Element $element */ |
644 | 644 | $element = $e->sender; |
645 | 645 | if ($element->uri !== null) { |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | Event::on( |
663 | 663 | Gql::class, |
664 | 664 | Gql::EVENT_REGISTER_GQL_TYPES, |
665 | - function (RegisterGqlTypesEvent $event) { |
|
665 | + function(RegisterGqlTypesEvent $event) { |
|
666 | 666 | Craft::debug( |
667 | 667 | 'Gql::EVENT_REGISTER_GQL_TYPES', |
668 | 668 | __METHOD__ |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | Event::on( |
675 | 675 | Gql::class, |
676 | 676 | Gql::EVENT_REGISTER_GQL_QUERIES, |
677 | - function (RegisterGqlQueriesEvent $event) { |
|
677 | + function(RegisterGqlQueriesEvent $event) { |
|
678 | 678 | Craft::debug( |
679 | 679 | 'Gql::EVENT_REGISTER_GQL_QUERIES', |
680 | 680 | __METHOD__ |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | Event::on( |
691 | 691 | Gql::class, |
692 | 692 | Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS, |
693 | - function (RegisterGqlSchemaComponentsEvent $event) { |
|
693 | + function(RegisterGqlSchemaComponentsEvent $event) { |
|
694 | 694 | Craft::debug( |
695 | 695 | 'Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS', |
696 | 696 | __METHOD__ |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | Event::on( |
708 | 708 | TypeManager::class, |
709 | 709 | TypeManager::EVENT_DEFINE_GQL_TYPE_FIELDS, |
710 | - function (DefineGqlTypeFieldsEvent $event) { |
|
710 | + function(DefineGqlTypeFieldsEvent $event) { |
|
711 | 711 | if (in_array($event->typeName, self::GQL_ELEMENT_INTERFACES, true)) { |
712 | 712 | Craft::debug( |
713 | 713 | 'TypeManager::EVENT_DEFINE_GQL_TYPE_FIELDS', |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | 'name' => 'seomatic', |
721 | 721 | 'type' => SeomaticInterface::getType(), |
722 | 722 | 'args' => SeomaticArguments::getArguments(), |
723 | - 'resolve' => SeomaticResolver::class . '::resolve', |
|
723 | + 'resolve' => SeomaticResolver::class.'::resolve', |
|
724 | 724 | 'description' => Craft::t('seomatic', 'This query is used to query for SEOmatic meta data.') |
725 | 725 | ]; |
726 | 726 | } |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | Event::on( |
765 | 765 | UrlManager::class, |
766 | 766 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
767 | - function (RegisterUrlRulesEvent $event) { |
|
767 | + function(RegisterUrlRulesEvent $event) { |
|
768 | 768 | Craft::debug( |
769 | 769 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
770 | 770 | __METHOD__ |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | Event::on( |
796 | 796 | UrlManager::class, |
797 | 797 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
798 | - function (RegisterUrlRulesEvent $event) { |
|
798 | + function(RegisterUrlRulesEvent $event) { |
|
799 | 799 | Craft::debug( |
800 | 800 | 'UrlManager::EVENT_REGISTER_CP_URL_RULES', |
801 | 801 | __METHOD__ |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | Event::on( |
812 | 812 | UserPermissions::class, |
813 | 813 | UserPermissions::EVENT_REGISTER_PERMISSIONS, |
814 | - function (RegisterUserPermissionsEvent $event) { |
|
814 | + function(RegisterUserPermissionsEvent $event) { |
|
815 | 815 | Craft::debug( |
816 | 816 | 'UserPermissions::EVENT_REGISTER_PERMISSIONS', |
817 | 817 | __METHOD__ |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | Event::on( |
834 | 834 | View::class, |
835 | 835 | View::EVENT_BEGIN_BODY, |
836 | - function () { |
|
836 | + function() { |
|
837 | 837 | Craft::debug( |
838 | 838 | 'View::EVENT_BEGIN_BODY', |
839 | 839 | __METHOD__ |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | Event::on( |
849 | 849 | View::class, |
850 | 850 | View::EVENT_END_BODY, |
851 | - function () { |
|
851 | + function() { |
|
852 | 852 | Craft::debug( |
853 | 853 | 'View::EVENT_END_BODY', |
854 | 854 | __METHOD__ |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | Event::on( |
864 | 864 | View::class, |
865 | 865 | View::EVENT_END_PAGE, |
866 | - function () { |
|
866 | + function() { |
|
867 | 867 | Craft::debug( |
868 | 868 | 'View::EVENT_END_PAGE', |
869 | 869 | __METHOD__ |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | // Don't cache Control Panel requests |
887 | 887 | self::$cacheDuration = 1; |
888 | 888 | // Prefix the Control Panel title |
889 | - self::$view->hook('cp.layouts.base', function (&$context) { |
|
889 | + self::$view->hook('cp.layouts.base', function(&$context) { |
|
890 | 890 | if (self::$devMode) { |
891 | 891 | $context['docTitle'] = self::$settings->devModeCpTitlePrefix.$context['docTitle']; |
892 | 892 | } else { |