@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | // Get the page number of this request |
155 | 155 | $request = Craft::$app->getRequest(); |
156 | 156 | if (!$request->isConsoleRequest) { |
157 | - $this->paginationPage = (string)$request->pageNum; |
|
157 | + $this->paginationPage = (string) $request->pageNum; |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $cache = Craft::$app->getCache(); |
230 | 230 | list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet( |
231 | 231 | self::CACHE_KEY.$cacheKey, |
232 | - function () use ($uri, $siteId) { |
|
232 | + function() use ($uri, $siteId) { |
|
233 | 233 | Craft::info( |
234 | 234 | 'Meta container cache miss: '.$uri.'/'.$siteId, |
235 | 235 | __METHOD__ |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $uniqueKey .= $bodyPosition; |
266 | 266 | $scriptData = Craft::$app->getCache()->getOrSet( |
267 | 267 | self::GLOBALS_CACHE_KEY.$uniqueKey, |
268 | - function () use ($uniqueKey, $bodyPosition) { |
|
268 | + function() use ($uniqueKey, $bodyPosition) { |
|
269 | 269 | Craft::info( |
270 | 270 | self::SCRIPTS_CACHE_KEY.' cache miss: '.$uniqueKey, |
271 | 271 | __METHOD__ |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | foreach ($scriptContainer->data as $metaScript) { |
280 | 280 | /** @var MetaScript $metaScript */ |
281 | 281 | if (!empty($metaScript->bodyTemplatePath) |
282 | - && ((int)$metaScript->bodyPosition === $bodyPosition)) { |
|
282 | + && ((int) $metaScript->bodyPosition === $bodyPosition)) { |
|
283 | 283 | $scriptData[] = $metaScript->renderBodyHtml(); |
284 | 284 | } |
285 | 285 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; |
341 | 341 | list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet( |
342 | 342 | self::GLOBALS_CACHE_KEY.$uniqueKey, |
343 | - function () use ($uniqueKey) { |
|
343 | + function() use ($uniqueKey) { |
|
344 | 344 | Craft::info( |
345 | 345 | self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey, |
346 | 346 | __METHOD__ |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | list ($testValue, $sourceSetting) = explode('.', $action); |
881 | 881 | |
882 | 882 | if ($parentBundle->{$container}->{$property} == $testValue) { |
883 | - $metaBundle->metaGlobalVars->{$settingName} = $metaBundle->metaGlobalVars->{$sourceSetting}; |
|
883 | + $metaBundle->metaGlobalVars->{$settingName} = $metaBundle->metaGlobalVars->{$sourceSetting}; |
|
884 | 884 | } |
885 | 885 | } |
886 | 886 | } |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function updateMetaBundle(MetaBundle $metaBundle, int $siteId) |
172 | 172 | { |
173 | - $metaBundle->sourceName = (string)$metaBundle->sourceName; |
|
174 | - $metaBundle->sourceTemplate = (string)$metaBundle->sourceTemplate; |
|
173 | + $metaBundle->sourceName = (string) $metaBundle->sourceName; |
|
174 | + $metaBundle->sourceTemplate = (string) $metaBundle->sourceTemplate; |
|
175 | 175 | // Make sure it validates |
176 | 176 | if ($metaBundle->validate(null, true)) { |
177 | 177 | // Save it out to a record |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | 'sourceSiteId' => $siteId, |
182 | 182 | ]; |
183 | 183 | if ($metaBundle->typeId !== null) { |
184 | - $metaBundle->typeId = (int)$metaBundle->typeId; |
|
184 | + $metaBundle->typeId = (int) $metaBundle->typeId; |
|
185 | 185 | } |
186 | 186 | if (!empty($metaBundle->typeId)) { |
187 | 187 | $params['typeId'] = $metaBundle->typeId; |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | public function getMetaBundleBySourceId(string $sourceBundleType, int $sourceId, int $sourceSiteId, $typeId = null) |
242 | 242 | { |
243 | 243 | $metaBundle = null; |
244 | - $typeId = (int)$typeId; |
|
244 | + $typeId = (int) $typeId; |
|
245 | 245 | // See if we have the meta bundle cached |
246 | 246 | if (!empty($this->metaBundlesBySourceId[$sourceBundleType][$sourceId][$sourceSiteId][$typeId])) { |
247 | 247 | $id = $this->metaBundlesBySourceId[$sourceBundleType][$sourceId][$sourceSiteId][$typeId]; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | public function getMetaBundleBySourceHandle(string $sourceBundleType, string $sourceHandle, int $sourceSiteId, $typeId = null) |
311 | 311 | { |
312 | 312 | $metaBundle = null; |
313 | - $typeId = (int)$typeId; |
|
313 | + $typeId = (int) $typeId; |
|
314 | 314 | // See if we have the meta bundle cached |
315 | 315 | if (!empty($this->metaBundlesBySourceHandle[$sourceBundleType][$sourceHandle][$sourceSiteId][$typeId])) { |
316 | 316 | $id = $this->metaBundlesBySourceHandle[$sourceBundleType][$sourceHandle][$sourceSiteId][$typeId]; |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | /** @var Section|CategoryGroup|ProductType $sourceModel */ |
399 | 399 | $sourceModel = $seoElement::sourceModelFromId($sourceId); |
400 | 400 | if ($sourceModel !== null) { |
401 | - $metaBundle->sourceName = (string)$sourceModel->name; |
|
401 | + $metaBundle->sourceName = (string) $sourceModel->name; |
|
402 | 402 | $metaBundle->sourceHandle = $sourceModel->handle; |
403 | 403 | } |
404 | 404 | } |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | ->from(['{{%seomatic_metabundles}}']) |
582 | 582 | ->where(['=', 'sourceBundleType', $seoElement::META_BUNDLE_TYPE]); |
583 | 583 | |
584 | - if ((int)$sourceSiteId !== 0) { |
|
584 | + if ((int) $sourceSiteId !== 0) { |
|
585 | 585 | $subQuery->andWhere(['sourceSiteId' => $sourceSiteId]); |
586 | 586 | } |
587 | 587 | if ($filter !== '') { |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | public function getContentMetaBundleForElement(Element $element) |
620 | 620 | { |
621 | 621 | $source = $this->getMetaSourceFromElement($element); |
622 | - $key = implode(".", $source) . '.' . $element->siteId; |
|
622 | + $key = implode(".", $source).'.'.$element->siteId; |
|
623 | 623 | |
624 | 624 | if (empty($this->elementContentMetaBundles[$key])) { |
625 | 625 | $this->elementContentMetaBundles[$key] = $this->getMetaBundleBySourceId($source[1], $source[0], $element->siteId, $source[4]); |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | $metaBundleDefaults = ArrayHelper::merge( |
915 | 915 | $seoElement::metaBundleConfig($sourceModel), |
916 | 916 | [ |
917 | - 'sourceTemplate' => (string)$siteSetting->template, |
|
917 | + 'sourceTemplate' => (string) $siteSetting->template, |
|
918 | 918 | 'sourceSiteId' => $siteSetting->siteId, |
919 | 919 | 'sourceAltSiteSettings' => $siteSettingsArray, |
920 | 920 | 'sourceDateUpdated' => $dateUpdated, |
@@ -99,16 +99,16 @@ |
||
99 | 99 | { |
100 | 100 | // Enforce types |
101 | 101 | if ($this->sitemapUrls !== null) { |
102 | - $this->sitemapUrls = (bool)$this->sitemapUrls; |
|
102 | + $this->sitemapUrls = (bool) $this->sitemapUrls; |
|
103 | 103 | } |
104 | 104 | if ($this->sitemapAssets !== null) { |
105 | - $this->sitemapAssets = (bool)$this->sitemapAssets; |
|
105 | + $this->sitemapAssets = (bool) $this->sitemapAssets; |
|
106 | 106 | } |
107 | 107 | if ($this->sitemapFiles !== null) { |
108 | - $this->sitemapFiles = (bool)$this->sitemapFiles; |
|
108 | + $this->sitemapFiles = (bool) $this->sitemapFiles; |
|
109 | 109 | } |
110 | 110 | if ($this->sitemapAltLinks !== null) { |
111 | - $this->sitemapAltLinks = (bool)$this->sitemapAltLinks; |
|
111 | + $this->sitemapAltLinks = (bool) $this->sitemapAltLinks; |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 |