| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 | // Get the page number of this request | 
| 161 | 161 | $request = Craft::$app->getRequest(); | 
| 162 | 162 |          if (!$request->isConsoleRequest) { | 
| 163 | - $this->paginationPage = (string)$request->pageNum; | |
| 163 | + $this->paginationPage = (string) $request->pageNum; | |
| 164 | 164 | } | 
| 165 | 165 | } | 
| 166 | 166 | |
| @@ -222,10 +222,10 @@ discard block | ||
| 222 | 222 | $dependency = $this->containerDependency; | 
| 223 | 223 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; | 
| 224 | 224 | list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet( | 
| 225 | - self::GLOBALS_CACHE_KEY . $uniqueKey, | |
| 226 | -            function () use ($uniqueKey) { | |
| 225 | + self::GLOBALS_CACHE_KEY.$uniqueKey, | |
| 226 | +            function() use ($uniqueKey) { | |
| 227 | 227 | Craft::info( | 
| 228 | - self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey, | |
| 228 | + self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey, | |
| 229 | 229 | __METHOD__ | 
| 230 | 230 | ); | 
| 231 | 231 | |
| @@ -346,7 +346,7 @@ discard block | ||
| 346 | 346 | ?? 1; | 
| 347 | 347 | } | 
| 348 | 348 | // Handle pagination | 
| 349 | - $paginationPage = 'page' . $this->paginationPage; | |
| 349 | + $paginationPage = 'page'.$this->paginationPage; | |
| 350 | 350 | // Get the path for the current request | 
| 351 | 351 | $request = Craft::$app->getRequest(); | 
| 352 | 352 | $requestPath = '/'; | 
| @@ -362,21 +362,21 @@ discard block | ||
| 362 | 362 | } | 
| 363 | 363 | } | 
| 364 | 364 | // Get our cache key | 
| 365 | - $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams(); | |
| 365 | + $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams(); | |
| 366 | 366 | // For requests with a status code of >= 400, use one cache key | 
| 367 | 367 |              if (!$request->isConsoleRequest) { | 
| 368 | 368 | $response = Craft::$app->getResponse(); | 
| 369 | 369 |                  if ($response->statusCode >= 400) { | 
| 370 | - $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode; | |
| 370 | + $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode; | |
| 371 | 371 | } | 
| 372 | 372 | } | 
| 373 | 373 | // Load the meta containers | 
| 374 | 374 | $dependency = new TagDependency([ | 
| 375 | 375 | 'tags' => [ | 
| 376 | 376 | self::GLOBAL_METACONTAINER_CACHE_TAG, | 
| 377 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId, | |
| 378 | - self::METACONTAINER_CACHE_TAG . $uri . $siteId, | |
| 379 | - self::METACONTAINER_CACHE_TAG . $cacheKey, | |
| 377 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId, | |
| 378 | + self::METACONTAINER_CACHE_TAG.$uri.$siteId, | |
| 379 | + self::METACONTAINER_CACHE_TAG.$cacheKey, | |
| 380 | 380 | ], | 
| 381 | 381 | ]); | 
| 382 | 382 | $this->containerDependency = $dependency; | 
| @@ -392,10 +392,10 @@ discard block | ||
| 392 | 392 |              } else { | 
| 393 | 393 | $cache = Craft::$app->getCache(); | 
| 394 | 394 | list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet( | 
| 395 | - self::CACHE_KEY . $cacheKey, | |
| 396 | -                    function () use ($uri, $siteId) { | |
| 395 | + self::CACHE_KEY.$cacheKey, | |
| 396 | +                    function() use ($uri, $siteId) { | |
| 397 | 397 | Craft::info( | 
| 398 | - 'Meta container cache miss: ' . $uri . '/' . $siteId, | |
| 398 | + 'Meta container cache miss: '.$uri.'/'.$siteId, | |
| 399 | 399 | __METHOD__ | 
| 400 | 400 | ); | 
| 401 | 401 | $this->loadGlobalMetaContainers($siteId); | 
| @@ -790,10 +790,10 @@ discard block | ||
| 790 | 790 | $cache = Craft::$app->getCache(); | 
| 791 | 791 | TagDependency::invalidate( | 
| 792 | 792 | $cache, | 
| 793 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId | |
| 793 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId | |
| 794 | 794 | ); | 
| 795 | 795 | Craft::info( | 
| 796 | - 'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId, | |
| 796 | + 'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId, | |
| 797 | 797 | __METHOD__ | 
| 798 | 798 | ); | 
| 799 | 799 | // Trigger an event to let other plugins/modules know we've cleared our caches | 
| @@ -820,9 +820,9 @@ discard block | ||
| 820 | 820 |          if ($siteId === null) { | 
| 821 | 821 | $siteId = Craft::$app->getSites()->currentSite->id ?? 1; | 
| 822 | 822 | } | 
| 823 | - TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId); | |
| 823 | + TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId); | |
| 824 | 824 | Craft::info( | 
| 825 | - 'Meta container cache cleared: ' . $uri . ' / ' . $siteId, | |
| 825 | + 'Meta container cache cleared: '.$uri.' / '.$siteId, | |
| 826 | 826 | __METHOD__ | 
| 827 | 827 | ); | 
| 828 | 828 | // Trigger an event to let other plugins/modules know we've cleared our caches | 
| @@ -939,7 +939,7 @@ discard block | ||
| 939 | 939 | |
| 940 | 940 | // Handle re-creating the `mainEntityOfPage` so that the model injected into the | 
| 941 | 941 | // templates has the appropriate attributes | 
| 942 | - $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE; | |
| 942 | + $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE; | |
| 943 | 943 | $generalContainer = $this->metaContainers[$generalContainerKey]; | 
| 944 | 944 |                      if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) { | 
| 945 | 945 | /** @var MetaJsonLd $jsonLdModel */ | 
| @@ -342,7 +342,7 @@ discard block | ||
| 342 | 342 | $lastSegment = end($segments); | 
| 343 | 343 | $site = Craft::$app->getSites()->getSiteByHandle($lastSegment); | 
| 344 | 344 |              if ($site !== null) { | 
| 345 | - $siteSuffix = '/' . $lastSegment; | |
| 345 | + $siteSuffix = '/'.$lastSegment; | |
| 346 | 346 | } | 
| 347 | 347 | } | 
| 348 | 348 | $currentUser = Craft::$app->getUser()->getIdentity(); | 
| @@ -350,31 +350,31 @@ discard block | ||
| 350 | 350 |          if ($currentUser->can('seomatic:dashboard')) { | 
| 351 | 351 | $subNavs['dashboard'] = [ | 
| 352 | 352 |                  'label' => Craft::t('seomatic', 'Dashboard'), | 
| 353 | - 'url' => 'seomatic/dashboard' . $siteSuffix, | |
| 353 | + 'url' => 'seomatic/dashboard'.$siteSuffix, | |
| 354 | 354 | ]; | 
| 355 | 355 | } | 
| 356 | 356 |          if ($currentUser->can('seomatic:global-meta')) { | 
| 357 | 357 | $subNavs['global'] = [ | 
| 358 | 358 |                  'label' => Craft::t('seomatic', 'Global SEO'), | 
| 359 | - 'url' => 'seomatic/global/general' . $siteSuffix, | |
| 359 | + 'url' => 'seomatic/global/general'.$siteSuffix, | |
| 360 | 360 | ]; | 
| 361 | 361 | } | 
| 362 | 362 |          if ($currentUser->can('seomatic:content-meta')) { | 
| 363 | 363 | $subNavs['content'] = [ | 
| 364 | 364 |                  'label' => Craft::t('seomatic', 'Content SEO'), | 
| 365 | - 'url' => 'seomatic/content' . $siteSuffix, | |
| 365 | + 'url' => 'seomatic/content'.$siteSuffix, | |
| 366 | 366 | ]; | 
| 367 | 367 | } | 
| 368 | 368 |          if ($currentUser->can('seomatic:site-settings')) { | 
| 369 | 369 | $subNavs['site'] = [ | 
| 370 | 370 |                  'label' => Craft::t('seomatic', 'Site Settings'), | 
| 371 | - 'url' => 'seomatic/site/identity' . $siteSuffix, | |
| 371 | + 'url' => 'seomatic/site/identity'.$siteSuffix, | |
| 372 | 372 | ]; | 
| 373 | 373 | } | 
| 374 | 374 |          if ($currentUser->can('seomatic:tracking-scripts')) { | 
| 375 | 375 | $subNavs['tracking'] = [ | 
| 376 | 376 |                  'label' => Craft::t('seomatic', 'Tracking Scripts'), | 
| 377 | - 'url' => 'seomatic/tracking/gtag' . $siteSuffix, | |
| 377 | + 'url' => 'seomatic/tracking/gtag'.$siteSuffix, | |
| 378 | 378 | ]; | 
| 379 | 379 | } | 
| 380 | 380 | $editableSettings = true; | 
| @@ -419,7 +419,7 @@ discard block | ||
| 419 | 419 | Event::on( | 
| 420 | 420 | Plugins::class, | 
| 421 | 421 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, | 
| 422 | -            function (PluginEvent $event) { | |
| 422 | +            function(PluginEvent $event) { | |
| 423 | 423 |                  if ($event->plugin === $this) { | 
| 424 | 424 | // Invalidate our caches after we've been installed | 
| 425 | 425 | $this->clearAllCaches(); | 
| @@ -440,7 +440,7 @@ discard block | ||
| 440 | 440 | Event::on( | 
| 441 | 441 | ClearCaches::class, | 
| 442 | 442 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, | 
| 443 | -            function (RegisterCacheOptionsEvent $event) { | |
| 443 | +            function(RegisterCacheOptionsEvent $event) { | |
| 444 | 444 | Craft::debug( | 
| 445 | 445 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', | 
| 446 | 446 | __METHOD__ | 
| @@ -456,7 +456,7 @@ discard block | ||
| 456 | 456 | Event::on( | 
| 457 | 457 | Plugins::class, | 
| 458 | 458 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, | 
| 459 | -            function (PluginEvent $event) { | |
| 459 | +            function(PluginEvent $event) { | |
| 460 | 460 |                  if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { | 
| 461 | 461 | // For all the emojis | 
| 462 | 462 | $settingsModel = $this->getSettings(); | 
| @@ -486,7 +486,7 @@ discard block | ||
| 486 | 486 | Event::on( | 
| 487 | 487 | Plugins::class, | 
| 488 | 488 | Plugins::EVENT_AFTER_LOAD_PLUGINS, | 
| 489 | -            function () { | |
| 489 | +            function() { | |
| 490 | 490 | // Delay registering SEO Elements to give other plugins a chance to load first | 
| 491 | 491 | $this->seoElements->getAllSeoElementTypes(false); | 
| 492 | 492 | // Delay installing GQL handlers to give other plugins a chance to register their own first | 
| @@ -507,7 +507,7 @@ discard block | ||
| 507 | 507 | Event::on( | 
| 508 | 508 | Fields::class, | 
| 509 | 509 | Fields::EVENT_REGISTER_FIELD_TYPES, | 
| 510 | -            static function (RegisterComponentTypesEvent $event) { | |
| 510 | +            static function(RegisterComponentTypesEvent $event) { | |
| 511 | 511 | $event->types[] = SeoSettingsField::class; | 
| 512 | 512 | $event->types[] = Seomatic_MetaField::class; | 
| 513 | 513 | } | 
| @@ -516,7 +516,7 @@ discard block | ||
| 516 | 516 | Event::on( | 
| 517 | 517 | Elements::class, | 
| 518 | 518 | Elements::EVENT_AFTER_SAVE_ELEMENT, | 
| 519 | -            static function (ElementEvent $event) { | |
| 519 | +            static function(ElementEvent $event) { | |
| 520 | 520 | Craft::debug( | 
| 521 | 521 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', | 
| 522 | 522 | __METHOD__ | 
| @@ -536,7 +536,7 @@ discard block | ||
| 536 | 536 | Event::on( | 
| 537 | 537 | Elements::class, | 
| 538 | 538 | Elements::EVENT_AFTER_DELETE_ELEMENT, | 
| 539 | -            static function (ElementEvent $event) { | |
| 539 | +            static function(ElementEvent $event) { | |
| 540 | 540 | Craft::debug( | 
| 541 | 541 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', | 
| 542 | 542 | __METHOD__ | 
| @@ -555,19 +555,19 @@ discard block | ||
| 555 | 555 | Event::on( | 
| 556 | 556 | Entry::class, | 
| 557 | 557 | Element::EVENT_REGISTER_PREVIEW_TARGETS, | 
| 558 | -                static function (RegisterPreviewTargetsEvent $e) { | |
| 558 | +                static function(RegisterPreviewTargetsEvent $e) { | |
| 559 | 559 | /** @var Element $element */ | 
| 560 | 560 | $element = $e->sender; | 
| 561 | 561 |                      if ($element->uri !== null) { | 
| 562 | 562 | $e->previewTargets[] = [ | 
| 563 | - 'label' => ' | |
| @@ -54,16 +54,16 @@ | ||
| 54 | 54 | public function includeMetaData($dependency) | 
| 55 | 55 |      { | 
| 56 | 56 |          Craft::beginProfile('MetaScriptContainer::includeMetaData', __METHOD__); | 
| 57 | - $uniqueKey = $this->handle . $dependency->tags[3] . $this->dataLayerHash(); | |
| 57 | + $uniqueKey = $this->handle.$dependency->tags[3].$this->dataLayerHash(); | |
| 58 | 58 | $cache = Craft::$app->getCache(); | 
| 59 | 59 |          if ($this->clearCache) { | 
| 60 | 60 | TagDependency::invalidate($cache, $dependency->tags[3]); | 
| 61 | 61 | } | 
| 62 | 62 | $tagData = $cache->getOrSet( | 
| 63 | - self::CONTAINER_TYPE . $uniqueKey, | |
| 64 | -            function () use ($uniqueKey) { | |
| 63 | + self::CONTAINER_TYPE.$uniqueKey, | |
| 64 | +            function() use ($uniqueKey) { | |
| 65 | 65 | Craft::info( | 
| 66 | - self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey, | |
| 66 | + self::CONTAINER_TYPE.' cache miss: '.$uniqueKey, | |
| 67 | 67 | __METHOD__ | 
| 68 | 68 | ); | 
| 69 | 69 | $tagData = []; |