@@ -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 | Seomatic::$previewingMetaContainers = false; |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // Preview the meta containers |
313 | 313 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
314 | 314 | MetaBundles::GLOBAL_META_BUNDLE, |
315 | - (int)$variables['currentSiteId'] |
|
315 | + (int) $variables['currentSiteId'] |
|
316 | 316 | ); |
317 | 317 | // Render the template |
318 | 318 | return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | // Get the site to edit |
457 | 457 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
458 | 458 | if ($typeId !== null && is_string($typeId)) { |
459 | - $typeId = (int)$typeId; |
|
459 | + $typeId = (int) $typeId; |
|
460 | 460 | } |
461 | 461 | // Get the (entry) type menu |
462 | 462 | $typeMenu = []; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $currentType = reset($typeMenu); |
471 | 471 | $variables['currentType'] = $typeMenu[$typeId] ?? $currentType; |
472 | 472 | $variables['currentTypeId'] = $typeId ?? key($typeMenu); |
473 | - $typeId = (int)$variables['currentTypeId']; |
|
473 | + $typeId = (int) $variables['currentTypeId']; |
|
474 | 474 | } |
475 | 475 | $pluginName = Seomatic::$settings->pluginName; |
476 | 476 | // Asset bundle |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | // Get the site to copy the settings from, if any |
492 | 492 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
493 | 493 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
494 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
494 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
495 | 495 | // Load the metabundle |
496 | 496 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
497 | 497 | $sourceBundleType, |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | // Preview the meta containers |
560 | 560 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
561 | 561 | $uri, |
562 | - (int)$variables['currentSiteId'], |
|
562 | + (int) $variables['currentSiteId'], |
|
563 | 563 | false, |
564 | 564 | false |
565 | 565 | ); |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | // Get the site to copy the settings from, if any |
694 | 694 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
695 | 695 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
696 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
696 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
697 | 697 | // Load the metabundle |
698 | 698 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
699 | 699 | Seomatic::$previewingMetaContainers = false; |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | // Get the site to copy the settings from, if any |
839 | 839 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
840 | 840 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
841 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
841 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
842 | 842 | // Load the metabundle |
843 | 843 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
844 | 844 | if ($editedMetaBundle) { |
@@ -1144,7 +1144,7 @@ discard block |
||
1144 | 1144 | if ($variables['showSites']) { |
1145 | 1145 | $variables['sitesMenuLabel'] = Craft::t( |
1146 | 1146 | 'site', |
1147 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
1147 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
1148 | 1148 | ); |
1149 | 1149 | } else { |
1150 | 1150 | $variables['sitesMenuLabel'] = ''; |