@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getSummary(): string |
68 | 68 | { |
69 | - return Craft::$app->getView()->render($this->viewPath . 'summary', ['panel' => $this]); |
|
69 | + return Craft::$app->getView()->render($this->viewPath.'summary', ['panel' => $this]); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getDetail(): string |
76 | 76 | { |
77 | - return Craft::$app->getView()->render($this->viewPath . 'detail', ['panel' => $this]); |
|
77 | + return Craft::$app->getView()->render($this->viewPath.'detail', ['panel' => $this]); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -55,5 +55,8 @@ |
||
55 | 55 | ]) ?> |
56 | 56 | </tr> |
57 | 57 | <?php endforeach; ?></tbody></table><?php if (!empty($value['__errors'])): ?><?php foreach ($value['__errors'] as $logLevel => $errorCat): ?><?php if (!empty($errorCat)): ?><ul class="callout callout-<?= $logLevel ?> seomatic-error"><?php foreach ($errorCat as $property => $errors): ?><li class="seomatic-error <?= $logLevel ?>"><?= $property ?></li><ul><?php foreach (array_unique($errors) as $error): ?><li><?= $error ?></li><?php endforeach; ?></ul><?php endforeach; ?></ul><?php endif; ?><?php endforeach; ?><?php endif; ?></div></details></td> |
58 | -<?php else: ?><td><div class="callout callout-secondary seomatic-callout">not included</div></td> |
|
59 | -<?php endif; ?> |
|
58 | +<?php else { |
|
59 | + : ?><td><div class="callout callout-secondary seomatic-callout">not included</div></td> |
|
60 | +<?php endif; |
|
61 | +} |
|
62 | +?> |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $content .= $this->render('rendered-tags', [ |
165 | 165 | 'values' => [ |
166 | 166 | 'renderedTags' => $panel->data[$metaBundleCategory]['renderedTags'][$metaContainerName] ?? [], |
167 | - 'id' => $sectionName . '-' . $metaBundleCategory . '-' . $metaContainerName . '-rendered-tags', |
|
167 | + 'id' => $sectionName.'-'.$metaBundleCategory.'-'.$metaContainerName.'-rendered-tags', |
|
168 | 168 | 'view' => $this, |
169 | 169 | 'language' => $editorLanguage, |
170 | 170 | ], |
@@ -109,12 +109,12 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
112 | - * Get all the sitemap index items by params. |
|
113 | - * |
|
114 | - * @param array $params |
|
115 | - * @return array |
|
116 | - * @throws \yii\web\NotFoundHttpException |
|
117 | - */ |
|
112 | + * Get all the sitemap index items by params. |
|
113 | + * |
|
114 | + * @param array $params |
|
115 | + * @return array |
|
116 | + * @throws \yii\web\NotFoundHttpException |
|
117 | + */ |
|
118 | 118 | public static function getSitemapStyles($source, $arguments, $context, ResolveInfo $resolveInfo): array |
119 | 119 | { |
120 | 120 | return [ |
@@ -40,7 +40,7 @@ |
||
40 | 40 | 'seomatic' => [ |
41 | 41 | 'type' => SeomaticInterface::getType(), |
42 | 42 | 'args' => SeomaticArguments::getArguments(), |
43 | - 'resolve' => SeomaticResolver::class . '::resolve', |
|
43 | + 'resolve' => SeomaticResolver::class.'::resolve', |
|
44 | 44 | 'description' => 'This query is used to query for SEOmatic meta data.', |
45 | 45 | ], |
46 | 46 | ]; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $type = GqlEntityRegistry::createEntity(self::class, new InterfaceType([ |
80 | 80 | 'name' => static::getName(), |
81 | - 'fields' => self::class . '::getFieldDefinitions', |
|
81 | + 'fields' => self::class.'::getFieldDefinitions', |
|
82 | 82 | 'description' => 'This is the interface implemented by SEOmatic.', |
83 | 83 | 'resolveType' => function(array $value) { |
84 | 84 | return GqlEntityRegistry::getEntity(SeomaticGenerator::getName()); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $fields[$key] = [ |
108 | 108 | 'name' => $key, |
109 | 109 | 'type' => Type::string(), |
110 | - 'description' => 'The ' . $value . ' SEOmatic container.', |
|
110 | + 'description' => 'The '.$value.' SEOmatic container.', |
|
111 | 111 | ]; |
112 | 112 | if (isset(self::DEPRECATED_GRAPH_QL_FIELDS[$key])) { |
113 | 113 | $fields[$key]['deprecationReason'] = self::DEPRECATED_GRAPH_QL_FIELDS[$key]; |
@@ -118,27 +118,27 @@ discard block |
||
118 | 118 | 'name' => 'sitemaps', |
119 | 119 | 'args' => SitemapArguments::getArguments(), |
120 | 120 | 'type' => Type::listOf(FileContentsType::getType()), |
121 | - 'resolve' => SitemapResolver::class . '::getSitemaps', |
|
121 | + 'resolve' => SitemapResolver::class.'::getSitemaps', |
|
122 | 122 | ]; |
123 | 123 | |
124 | 124 | $fields['sitemapIndexes'] = [ |
125 | 125 | 'name' => 'sitemapIndexes', |
126 | 126 | 'args' => SitemapIndexArguments::getArguments(), |
127 | 127 | 'type' => Type::listOf(FileContentsType::getType()), |
128 | - 'resolve' => SitemapResolver::class . '::getSitemapIndexes', |
|
128 | + 'resolve' => SitemapResolver::class.'::getSitemapIndexes', |
|
129 | 129 | ]; |
130 | 130 | |
131 | 131 | $fields['sitemapStyles'] = [ |
132 | 132 | 'name' => 'sitemapStyles', |
133 | 133 | 'type' => FileContentsType::getType(), |
134 | - 'resolve' => SitemapResolver::class . '::getSitemapStyles', |
|
134 | + 'resolve' => SitemapResolver::class.'::getSitemapStyles', |
|
135 | 135 | ]; |
136 | 136 | |
137 | 137 | $fields['frontendTemplates'] = [ |
138 | 138 | 'name' => 'frontendTemplates', |
139 | 139 | 'args' => FrontendContainerArguments::getArguments(), |
140 | 140 | 'type' => Type::listOf(FileContentsType::getType()), |
141 | - 'resolve' => FrontendContainerResolver::class . '::getContainerFiles', |
|
141 | + 'resolve' => FrontendContainerResolver::class.'::getContainerFiles', |
|
142 | 142 | ]; |
143 | 143 | |
144 | 144 | return $fields; |
@@ -601,8 +601,8 @@ |
||
601 | 601 | string $sourceBundleType, |
602 | 602 | string $sourceHandle, |
603 | 603 | string $siteHandle = null, |
604 | - $typeId = null, |
|
605 | - $loadFromSiteHandle = null |
|
604 | + $typeId = null, |
|
605 | + $loadFromSiteHandle = null |
|
606 | 606 | ): Response { |
607 | 607 | $variables = []; |
608 | 608 | // @TODO: Let people choose an entry/categorygroup/product as the preview |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
131 | 131 | $variables['title'] = $templateTitle; |
132 | 132 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
133 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
133 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
134 | 134 | $variables['crumbs'] = [ |
135 | 135 | [ |
136 | 136 | 'label' => $pluginName, |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | ], |
139 | 139 | [ |
140 | 140 | 'label' => $templateTitle, |
141 | - 'url' => UrlHelper::cpUrl('seomatic/dashboard' . $siteHandleUri), |
|
141 | + 'url' => UrlHelper::cpUrl('seomatic/dashboard'.$siteHandleUri), |
|
142 | 142 | ], |
143 | 143 | ]; |
144 | 144 | $variables['selectedSubnavItem'] = 'dashboard'; |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | foreach ($variables['metaBundles'] as $metaBundle) { |
162 | 162 | $stat = 0; |
163 | 163 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
164 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
164 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
165 | 165 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
166 | 166 | $variables['contentSetupChecklist'][$setupField] = [ |
167 | 167 | 'label' => $setupLabel, |
168 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
168 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
169 | 169 | ]; |
170 | 170 | } |
171 | 171 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -176,16 +176,16 @@ discard block |
||
176 | 176 | } |
177 | 177 | // Global SEO grades |
178 | 178 | Seomatic::$previewingMetaContainers = true; |
179 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId); |
|
179 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId); |
|
180 | 180 | Seomatic::$previewingMetaContainers = false; |
181 | 181 | if ($metaBundle !== null) { |
182 | 182 | $stat = 0; |
183 | 183 | $variables['globalSetupChecklist'] = []; |
184 | 184 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
185 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
185 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
186 | 186 | $variables['globalSetupChecklist'][$setupField] = [ |
187 | 187 | 'label' => $setupLabel, |
188 | - 'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
188 | + 'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
189 | 189 | ]; |
190 | 190 | } |
191 | 191 | $stat = round(($stat / $numFields) * 100); |
@@ -195,17 +195,17 @@ discard block |
||
195 | 195 | $stat = 0; |
196 | 196 | $variables['siteSetupChecklist'] = []; |
197 | 197 | foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) { |
198 | - $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]); |
|
198 | + $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]); |
|
199 | 199 | $variables['siteSetupChecklist'][$setupField] = [ |
200 | 200 | 'label' => $setupLabel, |
201 | - 'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]), |
|
201 | + 'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]), |
|
202 | 202 | ]; |
203 | 203 | } |
204 | 204 | foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) { |
205 | - $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
205 | + $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
206 | 206 | $variables['siteSetupChecklist'][$setupField] = [ |
207 | 207 | 'label' => $setupLabel, |
208 | - 'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
208 | + 'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
209 | 209 | ]; |
210 | 210 | } |
211 | 211 | $stat = round(($stat / $numFields) * 100); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | if ($siteHandle !== null) { |
231 | 231 | $site = Craft::$app->getSites()->getSiteByHandle($siteHandle); |
232 | 232 | if (!$site) { |
233 | - throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle); |
|
233 | + throw new NotFoundHttpException('Invalid site handle: '.$siteHandle); |
|
234 | 234 | } |
235 | 235 | $siteId = $site->id; |
236 | 236 | } else { |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | if (!empty($variables['enabledSiteIds'])) { |
268 | 268 | $siteId = reset($variables['enabledSiteIds']); |
269 | 269 | } else { |
270 | - $this->requirePermission('editSite:' . $siteId); |
|
270 | + $this->requirePermission('editSite:'.$siteId); |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | if ($variables['showSites']) { |
288 | 288 | $variables['sitesMenuLabel'] = Craft::t( |
289 | 289 | 'site', |
290 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
290 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
291 | 291 | ); |
292 | 292 | } else { |
293 | 293 | $variables['sitesMenuLabel'] = ''; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | $variables['title'] = $templateTitle; |
331 | 331 | $variables['subSectionTitle'] = $subSectionTitle; |
332 | 332 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
333 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
333 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
334 | 334 | $variables['crumbs'] = [ |
335 | 335 | [ |
336 | 336 | 'label' => $pluginName, |
@@ -338,11 +338,11 @@ discard block |
||
338 | 338 | ], |
339 | 339 | [ |
340 | 340 | 'label' => $templateTitle, |
341 | - 'url' => UrlHelper::cpUrl('seomatic/global/general' . $siteHandleUri), |
|
341 | + 'url' => UrlHelper::cpUrl('seomatic/global/general'.$siteHandleUri), |
|
342 | 342 | ], |
343 | 343 | [ |
344 | 344 | 'label' => $subSectionTitle, |
345 | - 'url' => UrlHelper::cpUrl('seomatic/global/' . $subSection . $siteHandleUri), |
|
345 | + 'url' => UrlHelper::cpUrl('seomatic/global/'.$subSection.$siteHandleUri), |
|
346 | 346 | ], |
347 | 347 | ]; |
348 | 348 | $variables['selectedSubnavItem'] = 'global'; |
@@ -350,14 +350,14 @@ discard block |
||
350 | 350 | $this->setGlobalFieldSourceVariables($variables); |
351 | 351 | // Enabled sites |
352 | 352 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
353 | - $variables['controllerHandle'] = 'global' . '/' . $subSection; |
|
353 | + $variables['controllerHandle'] = 'global'.'/'.$subSection; |
|
354 | 354 | $variables['currentSubSection'] = $subSection; |
355 | 355 | // Meta bundle settings |
356 | 356 | Seomatic::$previewingMetaContainers = true; |
357 | 357 | // Get the site to copy the settings from, if any |
358 | 358 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
359 | 359 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
360 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
360 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
361 | 361 | // Load the metabundle |
362 | 362 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
363 | 363 | if ($editedMetaBundle) { |
@@ -411,11 +411,11 @@ discard block |
||
411 | 411 | // Preview the meta containers |
412 | 412 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
413 | 413 | MetaBundles::GLOBAL_META_BUNDLE, |
414 | - (int)$variables['currentSiteId'] |
|
414 | + (int) $variables['currentSiteId'] |
|
415 | 415 | ); |
416 | 416 | |
417 | 417 | // Render the template |
418 | - return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables); |
|
418 | + return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | /** |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
562 | 562 | $variables['title'] = $templateTitle; |
563 | 563 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
564 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
564 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
565 | 565 | $variables['crumbs'] = [ |
566 | 566 | [ |
567 | 567 | 'label' => $pluginName, |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | ], |
570 | 570 | [ |
571 | 571 | 'label' => $templateTitle, |
572 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
572 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
573 | 573 | ], |
574 | 574 | ]; |
575 | 575 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | // Get the site to edit |
610 | 610 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
611 | 611 | if ($typeId !== null && is_string($typeId)) { |
612 | - $typeId = (int)$typeId; |
|
612 | + $typeId = (int) $typeId; |
|
613 | 613 | } |
614 | 614 | // Get the (entry) type menu |
615 | 615 | $typeMenu = []; |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | $currentType = reset($typeMenu); |
624 | 624 | $variables['currentType'] = $typeMenu[$typeId] ?? $currentType; |
625 | 625 | $variables['currentTypeId'] = $typeId ?? key($typeMenu); |
626 | - $typeId = (int)$variables['currentTypeId']; |
|
626 | + $typeId = (int) $variables['currentTypeId']; |
|
627 | 627 | } |
628 | 628 | $pluginName = Seomatic::$settings->pluginName; |
629 | 629 | // Asset bundle |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | // Get the site to copy the settings from, if any |
645 | 645 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
646 | 646 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
647 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
647 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
648 | 648 | // Load the metabundle |
649 | 649 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
650 | 650 | $sourceBundleType, |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $variables['title'] = $templateTitle; |
671 | 671 | $variables['subSectionTitle'] = $subSectionTitle; |
672 | 672 | $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}"; |
673 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
673 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
674 | 674 | $variables['siteHandleUri'] = $siteHandleUri; |
675 | 675 | $variables['crumbs'] = [ |
676 | 676 | [ |
@@ -679,10 +679,10 @@ discard block |
||
679 | 679 | ], |
680 | 680 | [ |
681 | 681 | 'label' => 'Content SEO', |
682 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
682 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
683 | 683 | ], |
684 | 684 | [ |
685 | - 'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle, |
|
685 | + 'label' => $metaBundle->sourceName.' · '.$subSectionTitle, |
|
686 | 686 | 'url' => UrlHelper::cpUrl("seomatic/edit-content/${subSection}/${sourceBundleType}/${sourceHandle}"), |
687 | 687 | ], |
688 | 688 | ]; |
@@ -712,13 +712,13 @@ discard block |
||
712 | 712 | // Preview the meta containers |
713 | 713 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
714 | 714 | $uri, |
715 | - (int)$variables['currentSiteId'], |
|
715 | + (int) $variables['currentSiteId'], |
|
716 | 716 | false, |
717 | 717 | false |
718 | 718 | ); |
719 | 719 | |
720 | 720 | // Render the template |
721 | - return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables); |
|
721 | + return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables); |
|
722 | 722 | } |
723 | 723 | |
724 | 724 | /** |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | array &$variables |
759 | 759 | ) { |
760 | 760 | $variables['textFieldSources'] = array_merge( |
761 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'], |
|
761 | + ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'], |
|
762 | 762 | FieldHelper::fieldsOfTypeFromSource( |
763 | 763 | $sourceBundleType, |
764 | 764 | $sourceHandle, |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | ) |
768 | 768 | ); |
769 | 769 | $variables['assetFieldSources'] = array_merge( |
770 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields']], |
|
770 | + ['entryGroup' => ['optgroup' => $groupName.' Fields']], |
|
771 | 771 | FieldHelper::fieldsOfTypeFromSource( |
772 | 772 | $sourceBundleType, |
773 | 773 | $sourceHandle, |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | if ($subSection === 'social') { |
903 | 903 | $subSectionSuffix = ' Media'; |
904 | 904 | } |
905 | - $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix); |
|
905 | + $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix); |
|
906 | 906 | // Asset bundle |
907 | 907 | try { |
908 | 908 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | $variables['title'] = $templateTitle; |
921 | 921 | $variables['subSectionTitle'] = $subSectionTitle; |
922 | 922 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
923 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
923 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
924 | 924 | $variables['crumbs'] = [ |
925 | 925 | [ |
926 | 926 | 'label' => $pluginName, |
@@ -928,11 +928,11 @@ discard block |
||
928 | 928 | ], |
929 | 929 | [ |
930 | 930 | 'label' => $templateTitle, |
931 | - 'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri), |
|
931 | + 'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri), |
|
932 | 932 | ], |
933 | 933 | [ |
934 | 934 | 'label' => $subSectionTitle, |
935 | - 'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri), |
|
935 | + 'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri), |
|
936 | 936 | ], |
937 | 937 | ]; |
938 | 938 | $variables['selectedSubnavItem'] = 'site'; |
@@ -940,14 +940,14 @@ discard block |
||
940 | 940 | |
941 | 941 | // Enabled sites |
942 | 942 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
943 | - $variables['controllerHandle'] = 'site' . '/' . $subSection; |
|
943 | + $variables['controllerHandle'] = 'site'.'/'.$subSection; |
|
944 | 944 | |
945 | 945 | // The site settings for the appropriate meta bundle |
946 | 946 | Seomatic::$previewingMetaContainers = true; |
947 | 947 | // Get the site to copy the settings from, if any |
948 | 948 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
949 | 949 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
950 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
950 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
951 | 951 | // Load the metabundle |
952 | 952 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
953 | 953 | Seomatic::$previewingMetaContainers = false; |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | $variables['elementType'] = Asset::class; |
966 | 966 | |
967 | 967 | // Render the template |
968 | - return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables); |
|
968 | + return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables); |
|
969 | 969 | } |
970 | 970 | |
971 | 971 | /** |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
1122 | 1122 | // Enabled sites |
1123 | 1123 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
1124 | - $variables['controllerHandle'] = 'tracking' . '/' . $subSection; |
|
1124 | + $variables['controllerHandle'] = 'tracking'.'/'.$subSection; |
|
1125 | 1125 | $variables['currentSubSection'] = $subSection; |
1126 | 1126 | |
1127 | 1127 | // The script meta containers for the global meta bundle |
@@ -1129,7 +1129,7 @@ discard block |
||
1129 | 1129 | // Get the site to copy the settings from, if any |
1130 | 1130 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
1131 | 1131 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
1132 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
1132 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
1133 | 1133 | // Load the metabundle |
1134 | 1134 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
1135 | 1135 | if ($editedMetaBundle) { |
@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | $variables['title'] = $templateTitle; |
1170 | 1170 | $variables['subSectionTitle'] = $subSectionTitle; |
1171 | 1171 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
1172 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
1172 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
1173 | 1173 | $variables['crumbs'] = [ |
1174 | 1174 | [ |
1175 | 1175 | 'label' => $pluginName, |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | ], |
1182 | 1182 | [ |
1183 | 1183 | 'label' => $subSectionTitle, |
1184 | - 'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri), |
|
1184 | + 'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri), |
|
1185 | 1185 | ], |
1186 | 1186 | ]; |
1187 | 1187 | $variables['selectedSubnavItem'] = 'tracking'; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } |
86 | 86 | // Add the Link header |
87 | 87 | if (!empty($canonical)) { |
88 | - $headerValue = '<' . $canonical . '>; rel="canonical"'; |
|
88 | + $headerValue = '<'.$canonical.'>; rel="canonical"'; |
|
89 | 89 | $response->headers->add('Link', $headerValue); |
90 | 90 | } |
91 | 91 | // Ensure the file type is allowed |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // Constants |
34 | 34 | // ========================================================================= |
35 | 35 | |
36 | - const FRONTENDTEMPLATES_CONTAINER = Seomatic::SEOMATIC_HANDLE . EditableTemplate::TEMPLATE_TYPE; |
|
36 | + const FRONTENDTEMPLATES_CONTAINER = Seomatic::SEOMATIC_HANDLE.EditableTemplate::TEMPLATE_TYPE; |
|
37 | 37 | |
38 | 38 | const HUMANS_TXT_HANDLE = 'humans'; |
39 | 39 | const ROBOTS_TXT_HANDLE = 'robots'; |
@@ -171,16 +171,16 @@ discard block |
||
171 | 171 | $dependency = new TagDependency([ |
172 | 172 | 'tags' => [ |
173 | 173 | self::GLOBAL_FRONTENDTEMPLATE_CACHE_TAG, |
174 | - self::FRONTENDTEMPLATE_CACHE_TAG . $template, |
|
175 | - self::FRONTENDTEMPLATE_CACHE_TAG . $template . $siteId, |
|
174 | + self::FRONTENDTEMPLATE_CACHE_TAG.$template, |
|
175 | + self::FRONTENDTEMPLATE_CACHE_TAG.$template.$siteId, |
|
176 | 176 | ], |
177 | 177 | ]); |
178 | 178 | $cache = Craft::$app->getCache(); |
179 | 179 | $html = $cache->getOrSet( |
180 | - self::CACHE_KEY . $template . $siteId, |
|
180 | + self::CACHE_KEY.$template.$siteId, |
|
181 | 181 | function() use ($template, $params) { |
182 | 182 | Craft::info( |
183 | - 'Frontend template cache miss: ' . $template, |
|
183 | + 'Frontend template cache miss: '.$template, |
|
184 | 184 | __METHOD__ |
185 | 185 | ); |
186 | 186 | $html = ''; |
@@ -251,9 +251,9 @@ discard block |
||
251 | 251 | public function invalidateFrontendTemplateCache(string $template) |
252 | 252 | { |
253 | 253 | $cache = Craft::$app->getCache(); |
254 | - TagDependency::invalidate($cache, self::FRONTENDTEMPLATE_CACHE_TAG . $template); |
|
254 | + TagDependency::invalidate($cache, self::FRONTENDTEMPLATE_CACHE_TAG.$template); |
|
255 | 255 | Craft::info( |
256 | - 'Frontend template cache cleared: ' . $template, |
|
256 | + 'Frontend template cache cleared: '.$template, |
|
257 | 257 | __METHOD__ |
258 | 258 | ); |
259 | 259 | } |