@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | self::$cacheDuration = self::$devMode |
304 | 304 | ? self::DEVMODE_CACHE_DURATION |
305 | 305 | : self::$settings->metaCacheDuration ?? null; |
306 | - self::$cacheDuration = self::$cacheDuration === null ? null : (int)self::$cacheDuration; |
|
306 | + self::$cacheDuration = self::$cacheDuration === null ? null : (int) self::$cacheDuration; |
|
307 | 307 | self::$environment = EnvironmentHelper::determineEnvironment(); |
308 | 308 | MetaValueHelper::cache(); |
309 | 309 | // Version helpers |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | Event::on( |
500 | 500 | Plugins::class, |
501 | 501 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
502 | - function (PluginEvent $event) { |
|
502 | + function(PluginEvent $event) { |
|
503 | 503 | if ($event->plugin === $this) { |
504 | 504 | // Invalidate our caches after we've been installed |
505 | 505 | $this->clearAllCaches(); |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | Event::on( |
521 | 521 | ClearCaches::class, |
522 | 522 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
523 | - function (RegisterCacheOptionsEvent $event) { |
|
523 | + function(RegisterCacheOptionsEvent $event) { |
|
524 | 524 | Craft::debug( |
525 | 525 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
526 | 526 | __METHOD__ |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | Event::on( |
537 | 537 | Plugins::class, |
538 | 538 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, |
539 | - function (PluginEvent $event) { |
|
539 | + function(PluginEvent $event) { |
|
540 | 540 | if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { |
541 | 541 | // For all the emojis |
542 | 542 | $settingsModel = $this->getSettings(); |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | Event::on( |
567 | 567 | Plugins::class, |
568 | 568 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
569 | - function () { |
|
569 | + function() { |
|
570 | 570 | // Install these only after all other plugins have loaded |
571 | 571 | $request = Craft::$app->getRequest(); |
572 | 572 | // Allow the SeoElements to register their own event handlers |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | Event::on( |
586 | 586 | Fields::class, |
587 | 587 | Fields::EVENT_REGISTER_FIELD_TYPES, |
588 | - function (RegisterComponentTypesEvent $event) { |
|
588 | + function(RegisterComponentTypesEvent $event) { |
|
589 | 589 | $event->types[] = SeoSettingsField::class; |
590 | 590 | $event->types[] = Seomatic_MetaField::class; |
591 | 591 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | Event::on( |
595 | 595 | Elements::class, |
596 | 596 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
597 | - function (ElementEvent $event) { |
|
597 | + function(ElementEvent $event) { |
|
598 | 598 | Craft::debug( |
599 | 599 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
600 | 600 | __METHOD__ |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | Event::on( |
615 | 615 | Elements::class, |
616 | 616 | Elements::EVENT_AFTER_DELETE_ELEMENT, |
617 | - function (ElementEvent $event) { |
|
617 | + function(ElementEvent $event) { |
|
618 | 618 | Craft::debug( |
619 | 619 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', |
620 | 620 | __METHOD__ |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | Event::on( |
634 | 634 | Entry::class, |
635 | 635 | Entry::EVENT_REGISTER_PREVIEW_TARGETS, |
636 | - function (RegisterPreviewTargetsEvent $e) { |
|
636 | + function(RegisterPreviewTargetsEvent $e) { |
|
637 | 637 | /** @var Element $element */ |
638 | 638 | $element = $e->sender; |
639 | 639 | if ($element->uri !== null) { |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | Event::on( |
657 | 657 | Gql::class, |
658 | 658 | Gql::EVENT_REGISTER_GQL_TYPES, |
659 | - function (RegisterGqlTypesEvent $event) { |
|
659 | + function(RegisterGqlTypesEvent $event) { |
|
660 | 660 | Craft::debug( |
661 | 661 | 'Gql::EVENT_REGISTER_GQL_TYPES', |
662 | 662 | __METHOD__ |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | Event::on( |
669 | 669 | Gql::class, |
670 | 670 | Gql::EVENT_REGISTER_GQL_QUERIES, |
671 | - function (RegisterGqlQueriesEvent $event) { |
|
671 | + function(RegisterGqlQueriesEvent $event) { |
|
672 | 672 | Craft::debug( |
673 | 673 | 'Gql::EVENT_REGISTER_GQL_QUERIES', |
674 | 674 | __METHOD__ |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | Event::on( |
684 | 684 | Gql::class, |
685 | 685 | Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS, |
686 | - function (RegisterGqlSchemaComponentsEvent $event) { |
|
686 | + function(RegisterGqlSchemaComponentsEvent $event) { |
|
687 | 687 | Craft::debug( |
688 | 688 | 'Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS', |
689 | 689 | __METHOD__ |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | Event::on( |
700 | 700 | TypeManager::class, |
701 | 701 | TypeManager::EVENT_DEFINE_GQL_TYPE_FIELDS, |
702 | - function (DefineGqlTypeFieldsEvent $event) { |
|
702 | + function(DefineGqlTypeFieldsEvent $event) { |
|
703 | 703 | if (in_array($event->typeName, self::GQL_ELEMENT_INTERFACES, true)) { |
704 | 704 | Craft::debug( |
705 | 705 | 'TypeManager::EVENT_DEFINE_GQL_TYPE_FIELDS', |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | 'name' => 'seomatic', |
713 | 713 | 'type' => SeomaticInterface::getType(), |
714 | 714 | 'args' => SeomaticArguments::getArguments(), |
715 | - 'resolve' => SeomaticResolver::class . '::resolve', |
|
715 | + 'resolve' => SeomaticResolver::class.'::resolve', |
|
716 | 716 | 'description' => Craft::t('seomatic', 'This query is used to query for SEOmatic meta data.') |
717 | 717 | ]; |
718 | 718 | } |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | Event::on( |
757 | 757 | UrlManager::class, |
758 | 758 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
759 | - function (RegisterUrlRulesEvent $event) { |
|
759 | + function(RegisterUrlRulesEvent $event) { |
|
760 | 760 | Craft::debug( |
761 | 761 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
762 | 762 | __METHOD__ |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | Event::on( |
788 | 788 | UrlManager::class, |
789 | 789 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
790 | - function (RegisterUrlRulesEvent $event) { |
|
790 | + function(RegisterUrlRulesEvent $event) { |
|
791 | 791 | Craft::debug( |
792 | 792 | 'UrlManager::EVENT_REGISTER_CP_URL_RULES', |
793 | 793 | __METHOD__ |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | Event::on( |
804 | 804 | UserPermissions::class, |
805 | 805 | UserPermissions::EVENT_REGISTER_PERMISSIONS, |
806 | - function (RegisterUserPermissionsEvent $event) { |
|
806 | + function(RegisterUserPermissionsEvent $event) { |
|
807 | 807 | Craft::debug( |
808 | 808 | 'UserPermissions::EVENT_REGISTER_PERMISSIONS', |
809 | 809 | __METHOD__ |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | Event::on( |
826 | 826 | View::class, |
827 | 827 | View::EVENT_BEGIN_BODY, |
828 | - function () { |
|
828 | + function() { |
|
829 | 829 | Craft::debug( |
830 | 830 | 'View::EVENT_BEGIN_BODY', |
831 | 831 | __METHOD__ |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | Event::on( |
841 | 841 | View::class, |
842 | 842 | View::EVENT_END_BODY, |
843 | - function () { |
|
843 | + function() { |
|
844 | 844 | Craft::debug( |
845 | 845 | 'View::EVENT_END_BODY', |
846 | 846 | __METHOD__ |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | Event::on( |
856 | 856 | View::class, |
857 | 857 | View::EVENT_END_PAGE, |
858 | - function () { |
|
858 | + function() { |
|
859 | 859 | Craft::debug( |
860 | 860 | 'View::EVENT_END_PAGE', |
861 | 861 | __METHOD__ |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | // Don't cache Control Panel requests |
879 | 879 | self::$cacheDuration = 1; |
880 | 880 | // Prefix the Control Panel title |
881 | - self::$view->hook('cp.layouts.base', function (&$context) { |
|
881 | + self::$view->hook('cp.layouts.base', function(&$context) { |
|
882 | 882 | if (self::$devMode) { |
883 | 883 | $context['docTitle'] = self::$settings->devModeCpTitlePrefix.$context['docTitle']; |
884 | 884 | } else { |