@@ -156,11 +156,11 @@ discard block |
||
156 | 156 | foreach ($variables['metaBundles'] as $metaBundle) { |
157 | 157 | $stat = 0; |
158 | 158 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
159 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
159 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
160 | 160 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
161 | 161 | $variables['contentSetupChecklist'][$setupField] = [ |
162 | 162 | 'label' => $setupLabel, |
163 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
163 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
164 | 164 | ]; |
165 | 165 | } |
166 | 166 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -171,16 +171,16 @@ discard block |
||
171 | 171 | } |
172 | 172 | // Global SEO grades |
173 | 173 | Seomatic::$previewingMetaContainers = true; |
174 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId); |
|
174 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId); |
|
175 | 175 | Seomatic::$previewingMetaContainers = false; |
176 | 176 | if ($metaBundle !== null) { |
177 | 177 | $stat = 0; |
178 | 178 | $variables['globalSetupChecklist'] = []; |
179 | 179 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
180 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
180 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
181 | 181 | $variables['globalSetupChecklist'][$setupField] = [ |
182 | 182 | 'label' => $setupLabel, |
183 | - 'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
183 | + 'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
184 | 184 | ]; |
185 | 185 | } |
186 | 186 | $stat = round(($stat / $numFields) * 100); |
@@ -190,17 +190,17 @@ discard block |
||
190 | 190 | $stat = 0; |
191 | 191 | $variables['siteSetupChecklist'] = []; |
192 | 192 | foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) { |
193 | - $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]); |
|
193 | + $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]); |
|
194 | 194 | $variables['siteSetupChecklist'][$setupField] = [ |
195 | 195 | 'label' => $setupLabel, |
196 | - 'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]), |
|
196 | + 'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]), |
|
197 | 197 | ]; |
198 | 198 | } |
199 | 199 | foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) { |
200 | - $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
200 | + $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
201 | 201 | $variables['siteSetupChecklist'][$setupField] = [ |
202 | 202 | 'label' => $setupLabel, |
203 | - 'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
203 | + 'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
204 | 204 | ]; |
205 | 205 | } |
206 | 206 | $stat = round(($stat / $numFields) * 100); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | // Get the site to copy the settings from, if any |
275 | 275 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
276 | 276 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
277 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
277 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
278 | 278 | // Load the metabundle |
279 | 279 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
280 | 280 | if ($editedMetaBundle) { |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | // Preview the meta containers |
316 | 316 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
317 | 317 | MetaBundles::GLOBAL_META_BUNDLE, |
318 | - (int)$variables['currentSiteId'] |
|
318 | + (int) $variables['currentSiteId'] |
|
319 | 319 | ); |
320 | 320 | // Render the template |
321 | 321 | return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables); |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | // Get the site to edit |
480 | 480 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
481 | 481 | if ($typeId !== null && is_string($typeId)) { |
482 | - $typeId = (int)$typeId; |
|
482 | + $typeId = (int) $typeId; |
|
483 | 483 | } |
484 | 484 | // Get the (entry) type menu |
485 | 485 | $typeMenu = []; |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | $currentType = reset($typeMenu); |
494 | 494 | $variables['currentType'] = $typeMenu[$typeId] ?? $currentType; |
495 | 495 | $variables['currentTypeId'] = $typeId ?? key($typeMenu); |
496 | - $typeId = (int)$variables['currentTypeId']; |
|
496 | + $typeId = (int) $variables['currentTypeId']; |
|
497 | 497 | } |
498 | 498 | $pluginName = Seomatic::$settings->pluginName; |
499 | 499 | // Asset bundle |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | // Get the site to copy the settings from, if any |
515 | 515 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
516 | 516 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
517 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
517 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
518 | 518 | // Load the metabundle |
519 | 519 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
520 | 520 | $sourceBundleType, |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | // Preview the meta containers |
583 | 583 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
584 | 584 | $uri, |
585 | - (int)$variables['currentSiteId'], |
|
585 | + (int) $variables['currentSiteId'], |
|
586 | 586 | false, |
587 | 587 | false |
588 | 588 | ); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | // Get the site to copy the settings from, if any |
717 | 717 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
718 | 718 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
719 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
719 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
720 | 720 | // Load the metabundle |
721 | 721 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
722 | 722 | Seomatic::$previewingMetaContainers = false; |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | // Get the site to copy the settings from, if any |
862 | 862 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
863 | 863 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
864 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
864 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
865 | 865 | // Load the metabundle |
866 | 866 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
867 | 867 | if ($editedMetaBundle) { |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | if ($variables['showSites']) { |
1161 | 1161 | $variables['sitesMenuLabel'] = Craft::t( |
1162 | 1162 | 'site', |
1163 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
1163 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
1164 | 1164 | ); |
1165 | 1165 | } else { |
1166 | 1166 | $variables['sitesMenuLabel'] = ''; |