@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | public function includeMetaData($dependency) |
56 | 56 | { |
57 | 57 | Craft::beginProfile('MetaScriptContainer::includeMetaData', __METHOD__); |
58 | - $uniqueKey = $this->handle . $dependency->tags[3] . $this->dataLayerHash(); |
|
58 | + $uniqueKey = $this->handle.$dependency->tags[3].$this->dataLayerHash(); |
|
59 | 59 | $cache = Craft::$app->getCache(); |
60 | 60 | if ($this->clearCache) { |
61 | 61 | TagDependency::invalidate($cache, $dependency->tags[3]); |
62 | 62 | } |
63 | 63 | $tagData = $cache->getOrSet( |
64 | - self::CONTAINER_TYPE . $uniqueKey, |
|
65 | - function () use ($uniqueKey) { |
|
64 | + self::CONTAINER_TYPE.$uniqueKey, |
|
65 | + function() use ($uniqueKey) { |
|
66 | 66 | Craft::info( |
67 | - self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey, |
|
67 | + self::CONTAINER_TYPE.' cache miss: '.$uniqueKey, |
|
68 | 68 | __METHOD__ |
69 | 69 | ); |
70 | 70 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | 'jQuery(window).load()', |
141 | 141 | ]; |
142 | 142 | $position = $positionNames[$config['position'] - 1] ?? 'unknown'; |
143 | - $html .= "<!-- Position: {$position} -->" . PHP_EOL; |
|
143 | + $html .= "<!-- Position: {$position} -->".PHP_EOL; |
|
144 | 144 | } |
145 | 145 | if ($bodyJs || !$params['renderScriptTags']) { |
146 | 146 | $html .= $config['js']; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | self::$cacheDuration = self::$devMode |
274 | 274 | ? self::DEVMODE_CACHE_DURATION |
275 | 275 | : self::$settings->metaCacheDuration ?? null; |
276 | - self::$cacheDuration = self::$cacheDuration === null ? null : (int)self::$cacheDuration; |
|
276 | + self::$cacheDuration = self::$cacheDuration === null ? null : (int) self::$cacheDuration; |
|
277 | 277 | self::$environment = EnvironmentHelper::determineEnvironment(); |
278 | 278 | MetaValueHelper::cache(); |
279 | 279 | // Version helpers |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | Event::on( |
349 | 349 | Plugins::class, |
350 | 350 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
351 | - function (PluginEvent $event) { |
|
351 | + function(PluginEvent $event) { |
|
352 | 352 | if ($event->plugin === $this) { |
353 | 353 | // Invalidate our caches after we've been installed |
354 | 354 | $this->clearAllCaches(); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | Event::on( |
370 | 370 | ClearCaches::class, |
371 | 371 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
372 | - function (RegisterCacheOptionsEvent $event) { |
|
372 | + function(RegisterCacheOptionsEvent $event) { |
|
373 | 373 | Craft::debug( |
374 | 374 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
375 | 375 | __METHOD__ |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | Event::on( |
386 | 386 | Plugins::class, |
387 | 387 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, |
388 | - function (PluginEvent $event) { |
|
388 | + function(PluginEvent $event) { |
|
389 | 389 | if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { |
390 | 390 | // For all the emojis |
391 | 391 | $settingsModel = $this->getSettings(); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | Event::on( |
439 | 439 | Plugins::class, |
440 | 440 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
441 | - function () { |
|
441 | + function() { |
|
442 | 442 | // Delay registering SEO Elements to give other plugins a chance to load first |
443 | 443 | $this->seoElements->getAllSeoElementTypes(false); |
444 | 444 | // Delay installing GQL handlers to give other plugins a chance to register their own first |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | Event::on( |
460 | 460 | Fields::class, |
461 | 461 | Fields::EVENT_REGISTER_FIELD_TYPES, |
462 | - function (RegisterComponentTypesEvent $event) { |
|
462 | + function(RegisterComponentTypesEvent $event) { |
|
463 | 463 | $event->types[] = SeoSettingsField::class; |
464 | 464 | $event->types[] = Seomatic_MetaField::class; |
465 | 465 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | Event::on( |
469 | 469 | Elements::class, |
470 | 470 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
471 | - function (ElementEvent $event) { |
|
471 | + function(ElementEvent $event) { |
|
472 | 472 | Craft::debug( |
473 | 473 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
474 | 474 | __METHOD__ |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | Event::on( |
489 | 489 | Elements::class, |
490 | 490 | Elements::EVENT_AFTER_DELETE_ELEMENT, |
491 | - function (ElementEvent $event) { |
|
491 | + function(ElementEvent $event) { |
|
492 | 492 | Craft::debug( |
493 | 493 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', |
494 | 494 | __METHOD__ |
@@ -507,19 +507,19 @@ discard block |
||
507 | 507 | Event::on( |
508 | 508 | Entry::class, |
509 | 509 | Entry::EVENT_REGISTER_PREVIEW_TARGETS, |
510 | - function (RegisterPreviewTargetsEvent $e) { |
|
510 | + function(RegisterPreviewTargetsEvent $e) { |
|
511 | 511 | /** @var Element $element */ |
512 | 512 | $element = $e->sender; |
513 | 513 | if ($element->uri !== null) { |
514 | 514 | $e->previewTargets[] = [ |
515 | - 'label' => ' |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | $model = null; |
116 | 116 | |
117 | - $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $schemaType; |
|
117 | + $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$schemaType; |
|
118 | 118 | /** @var $model MetaJsonLd */ |
119 | 119 | if (class_exists($className)) { |
120 | 120 | self::cleanProperties($className, $config); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | foreach ($dataToValidate as $key => $data) { |
374 | 374 | /** @var array $expectedTypes */ |
375 | 375 | foreach ($expectedTypes as $expectedType) { |
376 | - $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $expectedType; |
|
376 | + $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$expectedType; |
|
377 | 377 | switch ($expectedType) { |
378 | 378 | // Text always validates |
379 | 379 | case 'Text': |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | case 'Date': |
414 | 414 | $validator = new DateValidator; |
415 | 415 | $validator->type = DateValidator::TYPE_DATE; |
416 | - $validator->format = 'php:' . DateTime::ATOM; |
|
416 | + $validator->format = 'php:'.DateTime::ATOM; |
|
417 | 417 | if ($validator->validate($data, $error)) { |
418 | 418 | $validated = true; |
419 | 419 | } |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | $validated = true; |
460 | 460 | } |
461 | 461 | if (is_string($data)) { |
462 | - $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\' . $data; |
|
462 | + $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\'.$data; |
|
463 | 463 | if (class_exists($targetClass)) { |
464 | 464 | $validated = true; |
465 | 465 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | } |
469 | 469 | } |
470 | 470 | if (!$validated) { |
471 | - $this->addError($attribute, 'Must be one of these types: ' . implode(', ', $expectedTypes)); |
|
471 | + $this->addError($attribute, 'Must be one of these types: '.implode(', ', $expectedTypes)); |
|
472 | 472 | } |
473 | 473 | } |
474 | 474 | } |