@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | foreach ($variables['metaBundles'] as $metaBundle) { |
154 | 154 | $stat = 0; |
155 | 155 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
156 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
156 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
157 | 157 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
158 | 158 | $variables['contentSetupChecklist'][$setupField] = [ |
159 | 159 | 'label' => $setupLabel, |
160 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
160 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
161 | 161 | ]; |
162 | 162 | } |
163 | 163 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -168,16 +168,16 @@ discard block |
||
168 | 168 | } |
169 | 169 | // Global SEO grades |
170 | 170 | Seomatic::$previewingMetaContainers = true; |
171 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId); |
|
171 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId); |
|
172 | 172 | Seomatic::$previewingMetaContainers = false; |
173 | 173 | if ($metaBundle !== null) { |
174 | 174 | $stat = 0; |
175 | 175 | $variables['globalSetupChecklist'] = []; |
176 | 176 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
177 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
177 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
178 | 178 | $variables['globalSetupChecklist'][$setupField] = [ |
179 | 179 | 'label' => $setupLabel, |
180 | - 'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
180 | + 'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
181 | 181 | ]; |
182 | 182 | } |
183 | 183 | $stat = round(($stat / $numFields) * 100); |
@@ -187,17 +187,17 @@ discard block |
||
187 | 187 | $stat = 0; |
188 | 188 | $variables['siteSetupChecklist'] = []; |
189 | 189 | foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) { |
190 | - $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]); |
|
190 | + $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]); |
|
191 | 191 | $variables['siteSetupChecklist'][$setupField] = [ |
192 | 192 | 'label' => $setupLabel, |
193 | - 'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]), |
|
193 | + 'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]), |
|
194 | 194 | ]; |
195 | 195 | } |
196 | 196 | foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) { |
197 | - $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
197 | + $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
198 | 198 | $variables['siteSetupChecklist'][$setupField] = [ |
199 | 199 | 'label' => $setupLabel, |
200 | - 'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
200 | + 'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
201 | 201 | ]; |
202 | 202 | } |
203 | 203 | $stat = round(($stat / $numFields) * 100); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $variables['currentSubSection'] = $subSection; |
268 | 268 | // Meta bundle settings |
269 | 269 | Seomatic::$previewingMetaContainers = true; |
270 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$variables['currentSiteId']); |
|
270 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $variables['currentSiteId']); |
|
271 | 271 | Seomatic::$previewingMetaContainers = false; |
272 | 272 | if ($metaBundle !== null) { |
273 | 273 | $variables['metaGlobalVars'] = $metaBundle->metaGlobalVars; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | // Preview the meta containers |
298 | 298 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
299 | 299 | MetaBundles::GLOBAL_META_BUNDLE, |
300 | - (int)$variables['currentSiteId'] |
|
300 | + (int) $variables['currentSiteId'] |
|
301 | 301 | ); |
302 | 302 | |
303 | 303 | // Render the template |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
462 | 462 | $sourceBundleType, |
463 | 463 | $sourceHandle, |
464 | - (int)$variables['currentSiteId'] |
|
464 | + (int) $variables['currentSiteId'] |
|
465 | 465 | ); |
466 | 466 | Seomatic::$previewingMetaContainers = false; |
467 | 467 | $templateTitle = ''; |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | // Preview the meta containers |
523 | 523 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
524 | 524 | $uri, |
525 | - (int)$variables['currentSiteId'], |
|
525 | + (int) $variables['currentSiteId'], |
|
526 | 526 | false, |
527 | 527 | false |
528 | 528 | ); |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | // The site settings for the appropriate meta bundle |
651 | 651 | Seomatic::$previewingMetaContainers = true; |
652 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$variables['currentSiteId']); |
|
652 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $variables['currentSiteId']); |
|
653 | 653 | Seomatic::$previewingMetaContainers = false; |
654 | 654 | if ($metaBundle !== null) { |
655 | 655 | $variables['site'] = $metaBundle->metaSiteVars; |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | |
789 | 789 | // The script meta containers for the global meta bundle |
790 | 790 | Seomatic::$previewingMetaContainers = true; |
791 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$variables['currentSiteId']); |
|
791 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $variables['currentSiteId']); |
|
792 | 792 | Seomatic::$previewingMetaContainers = false; |
793 | 793 | if ($metaBundle !== null) { |
794 | 794 | $variables['scripts'] = Seomatic::$plugin->metaBundles->getContainerDataFromBundle( |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | if ($variables['showSites']) { |
1068 | 1068 | $variables['sitesMenuLabel'] = Craft::t( |
1069 | 1069 | 'site', |
1070 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
1070 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
1071 | 1071 | ); |
1072 | 1072 | } else { |
1073 | 1073 | $variables['sitesMenuLabel'] = ''; |