@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | // Add a URL to the schema.org type if this is a MetaJsonLD object |
158 | 158 | if ($isMetaJsonLdModel) { |
159 | 159 | /** @var $this MetaJsonLd */ |
160 | - $extraInfo = ' for http://schema.org/' . $this->type; |
|
160 | + $extraInfo = ' for http://schema.org/'.$this->type; |
|
161 | 161 | } |
162 | 162 | $errorMsg = |
163 | 163 | Craft::t('seomatic', 'Scenario: "') |
@@ -168,10 +168,10 @@ discard block |
||
168 | 168 | . print_r($this->render(), true); |
169 | 169 | Craft::info($errorMsg, __METHOD__); |
170 | 170 | foreach ($this->errors as $param => $errors) { |
171 | - $errorMsg = Craft::t('seomatic', $errorLabel) . $param; |
|
171 | + $errorMsg = Craft::t('seomatic', $errorLabel).$param; |
|
172 | 172 | /** @var array $errors */ |
173 | 173 | foreach ($errors as $error) { |
174 | - $errorMsg .= ' -> ' . $error; |
|
174 | + $errorMsg .= ' -> '.$error; |
|
175 | 175 | // Change the error level depending on the error message if this is a MetaJsonLD object |
176 | 176 | if ($isMetaJsonLdModel) { |
177 | 177 | if (strpos($error, 'recommended') !== false) { |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | /** @var MetaJsonLd $className */ |
191 | 191 | $className = \get_class($this); |
192 | 192 | if (!empty($className::$schemaPropertyDescriptions[$param])) { |
193 | - $errorMsg = Craft::t('seomatic', $errorLabel) . $param; |
|
193 | + $errorMsg = Craft::t('seomatic', $errorLabel).$param; |
|
194 | 194 | /** @var $className MetaJsonLd */ |
195 | - $errorMsg .= ' -> ' . $className::$schemaPropertyDescriptions[$param]; |
|
195 | + $errorMsg .= ' -> '.$className::$schemaPropertyDescriptions[$param]; |
|
196 | 196 | Craft::info($errorMsg, __METHOD__); |
197 | 197 | } |
198 | 198 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | if (!empty($attrs) && ArrayHelper::isIndexed($attrs, true)) { |
216 | 216 | $attrs = []; |
217 | - foreach($this->tagAttrs as $attr) { |
|
217 | + foreach ($this->tagAttrs as $attr) { |
|
218 | 218 | $attrs[$attr['name']] = $attr['value']; |
219 | 219 | } |
220 | 220 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | ]; |
58 | 58 | } |
59 | 59 | |
60 | - array_walk($containerItems, function (&$contents, $type) use ($typeMap) { |
|
60 | + array_walk($containerItems, function(&$contents, $type) use ($typeMap) { |
|
61 | 61 | $contents = [ |
62 | 62 | 'filename' => $typeMap[$type], |
63 | 63 | 'contents' => $contents |
@@ -111,12 +111,12 @@ |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
114 | - * Get all the sitemap index items by params. |
|
115 | - * |
|
116 | - * @param array $params |
|
117 | - * @return array |
|
118 | - * @throws \yii\web\NotFoundHttpException |
|
119 | - */ |
|
114 | + * Get all the sitemap index items by params. |
|
115 | + * |
|
116 | + * @param array $params |
|
117 | + * @return array |
|
118 | + * @throws \yii\web\NotFoundHttpException |
|
119 | + */ |
|
120 | 120 | public static function getSitemapStyles($source, $arguments, $context, ResolveInfo $resolveInfo): array |
121 | 121 | { |
122 | 122 | return [ |
@@ -53,7 +53,7 @@ |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | // If either of the source bundle arguments are present, get the sitemap |
56 | - if (!empty($arguments['sourceBundleType']) || !empty($arguments['sourceBundleHandle'])) { |
|
56 | + if (!empty($arguments['sourceBundleType']) || !empty($arguments['sourceBundleHandle'])) { |
|
57 | 57 | $filename = self::createFilenameFromComponents($site->groupId, $arguments['sourceBundleType'] ?? '', $arguments['sourceBundleHandle'] ?? '', $siteId); |
58 | 58 | |
59 | 59 | return [ |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'name' => static::getName(), |
81 | 81 | 'fields' => self::class.'::getFieldDefinitions', |
82 | 82 | 'description' => 'This is the interface implemented by SEOmatic.', |
83 | - 'resolveType' => function (array $value) { |
|
83 | + 'resolveType' => function(array $value) { |
|
84 | 84 | return GqlEntityRegistry::getEntity(SeomaticGenerator::getName()); |
85 | 85 | }, |
86 | 86 | ])); |
@@ -119,27 +119,27 @@ discard block |
||
119 | 119 | 'name' => 'sitemaps', |
120 | 120 | 'args' => SitemapArguments::getArguments(), |
121 | 121 | 'type' => Type::listOf(FileContentsType::getType()), |
122 | - 'resolve' => SitemapResolver::class .'::getSitemaps' |
|
122 | + 'resolve' => SitemapResolver::class.'::getSitemaps' |
|
123 | 123 | ]; |
124 | 124 | |
125 | 125 | $fields['sitemapIndexes'] = [ |
126 | 126 | 'name' => 'sitemapIndexes', |
127 | 127 | 'args' => SitemapIndexArguments::getArguments(), |
128 | 128 | 'type' => Type::listOf(FileContentsType::getType()), |
129 | - 'resolve' => SitemapResolver::class .'::getSitemapIndexes' |
|
129 | + 'resolve' => SitemapResolver::class.'::getSitemapIndexes' |
|
130 | 130 | ]; |
131 | 131 | |
132 | 132 | $fields['sitemapStyles'] = [ |
133 | 133 | 'name' => 'sitemapStyles', |
134 | 134 | 'type' => FileContentsType::getType(), |
135 | - 'resolve' => SitemapResolver::class .'::getSitemapStyles' |
|
135 | + 'resolve' => SitemapResolver::class.'::getSitemapStyles' |
|
136 | 136 | ]; |
137 | 137 | |
138 | 138 | $fields['frontendTemplates'] = [ |
139 | 139 | 'name' => 'frontendTemplates', |
140 | 140 | 'args' => FrontendContainerArguments::getArguments(), |
141 | 141 | 'type' => Type::listOf(FileContentsType::getType()), |
142 | - 'resolve' => FrontendContainerResolver::class .'::getContainerFiles' |
|
142 | + 'resolve' => FrontendContainerResolver::class.'::getContainerFiles' |
|
143 | 143 | ]; |
144 | 144 | |
145 | 145 | return $fields; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function getFilename(int $groupId): string |
118 | 118 | { |
119 | - return 'sitemaps-' . $groupId . '-sitemap.xml'; |
|
119 | + return 'sitemaps-'.$groupId.'-sitemap.xml'; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | ], |
150 | 150 | ]); |
151 | 151 | |
152 | - return $cache->getOrSet(self::CACHE_KEY.$groupId.'.'.$siteId, function () use ($groupSiteIds, $siteId) { |
|
152 | + return $cache->getOrSet(self::CACHE_KEY.$groupId.'.'.$siteId, function() use ($groupSiteIds, $siteId) { |
|
153 | 153 | Craft::info( |
154 | 154 | 'Sitemap index cache miss', |
155 | 155 | __METHOD__ |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'name' => 'Frontend Templates', |
23 | 23 | 'description' => 'Templates that are rendered on the frontend', |
24 | 24 | 'handle' => FrontendTemplates::FRONTENDTEMPLATES_CONTAINER, |
25 | - 'class' => (string)FrontendTemplateContainer::class, |
|
25 | + 'class' => (string) FrontendTemplateContainer::class, |
|
26 | 26 | 'include' => true, |
27 | 27 | 'data' => [ |
28 | 28 | FrontendTemplates::HUMANS_TXT_HANDLE => [ |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | // Get the page number of this request |
158 | 158 | $request = Craft::$app->getRequest(); |
159 | 159 | if (!$request->isConsoleRequest) { |
160 | - $this->paginationPage = (string)$request->pageNum; |
|
160 | + $this->paginationPage = (string) $request->pageNum; |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; |
174 | 174 | $uniqueKey .= $bodyPosition; |
175 | 175 | $scriptData = Craft::$app->getCache()->getOrSet( |
176 | - self::GLOBALS_CACHE_KEY . $uniqueKey, |
|
177 | - function () use ($uniqueKey, $bodyPosition) { |
|
176 | + self::GLOBALS_CACHE_KEY.$uniqueKey, |
|
177 | + function() use ($uniqueKey, $bodyPosition) { |
|
178 | 178 | Craft::info( |
179 | - self::SCRIPTS_CACHE_KEY . ' cache miss: ' . $uniqueKey, |
|
179 | + self::SCRIPTS_CACHE_KEY.' cache miss: '.$uniqueKey, |
|
180 | 180 | __METHOD__ |
181 | 181 | ); |
182 | 182 | $scriptData = []; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | foreach ($scriptContainer->data as $metaScript) { |
189 | 189 | /** @var MetaScript $metaScript */ |
190 | 190 | if (!empty($metaScript->bodyTemplatePath) |
191 | - && ((int)$metaScript->bodyPosition === $bodyPosition)) { |
|
191 | + && ((int) $metaScript->bodyPosition === $bodyPosition)) { |
|
192 | 192 | $scriptData[] = $metaScript->renderBodyHtml(); |
193 | 193 | } |
194 | 194 | } |
@@ -268,10 +268,10 @@ discard block |
||
268 | 268 | $dependency = $this->containerDependency; |
269 | 269 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; |
270 | 270 | list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet( |
271 | - self::GLOBALS_CACHE_KEY . $uniqueKey, |
|
272 | - function () use ($uniqueKey) { |
|
271 | + self::GLOBALS_CACHE_KEY.$uniqueKey, |
|
272 | + function() use ($uniqueKey) { |
|
273 | 273 | Craft::info( |
274 | - self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey, |
|
274 | + self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey, |
|
275 | 275 | __METHOD__ |
276 | 276 | ); |
277 | 277 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | ?? 1; |
393 | 393 | } |
394 | 394 | // Handle pagination |
395 | - $paginationPage = 'page' . $this->paginationPage; |
|
395 | + $paginationPage = 'page'.$this->paginationPage; |
|
396 | 396 | // Get the path for the current request |
397 | 397 | $request = Craft::$app->getRequest(); |
398 | 398 | $requestPath = '/'; |
@@ -408,21 +408,21 @@ discard block |
||
408 | 408 | } |
409 | 409 | } |
410 | 410 | // Get our cache key |
411 | - $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams(); |
|
411 | + $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams(); |
|
412 | 412 | // For requests with a status code of >= 400, use one cache key |
413 | 413 | if (!$request->isConsoleRequest) { |
414 | 414 | $response = Craft::$app->getResponse(); |
415 | 415 | if ($response->statusCode >= 400) { |
416 | - $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode; |
|
416 | + $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode; |
|
417 | 417 | } |
418 | 418 | } |
419 | 419 | // Load the meta containers |
420 | 420 | $dependency = new TagDependency([ |
421 | 421 | 'tags' => [ |
422 | 422 | self::GLOBAL_METACONTAINER_CACHE_TAG, |
423 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId, |
|
424 | - self::METACONTAINER_CACHE_TAG . $uri . $siteId, |
|
425 | - self::METACONTAINER_CACHE_TAG . $cacheKey, |
|
423 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId, |
|
424 | + self::METACONTAINER_CACHE_TAG.$uri.$siteId, |
|
425 | + self::METACONTAINER_CACHE_TAG.$cacheKey, |
|
426 | 426 | ], |
427 | 427 | ]); |
428 | 428 | $this->containerDependency = $dependency; |
@@ -438,10 +438,10 @@ discard block |
||
438 | 438 | } else { |
439 | 439 | $cache = Craft::$app->getCache(); |
440 | 440 | list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet( |
441 | - self::CACHE_KEY . $cacheKey, |
|
442 | - function () use ($uri, $siteId) { |
|
441 | + self::CACHE_KEY.$cacheKey, |
|
442 | + function() use ($uri, $siteId) { |
|
443 | 443 | Craft::info( |
444 | - 'Meta container cache miss: ' . $uri . '/' . $siteId, |
|
444 | + 'Meta container cache miss: '.$uri.'/'.$siteId, |
|
445 | 445 | __METHOD__ |
446 | 446 | ); |
447 | 447 | $this->loadGlobalMetaContainers($siteId); |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | |
711 | 711 | // Handle re-creating the `mainEntityOfPage` so that the model injected into the |
712 | 712 | // templates has the appropriate attributes |
713 | - $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE; |
|
713 | + $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE; |
|
714 | 714 | $generalContainer = $this->metaContainers[$generalContainerKey]; |
715 | 715 | if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) { |
716 | 716 | /** @var MetaJsonLd $jsonLdModel */ |
@@ -962,10 +962,10 @@ discard block |
||
962 | 962 | $cache = Craft::$app->getCache(); |
963 | 963 | TagDependency::invalidate( |
964 | 964 | $cache, |
965 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId |
|
965 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId |
|
966 | 966 | ); |
967 | 967 | Craft::info( |
968 | - 'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId, |
|
968 | + 'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId, |
|
969 | 969 | __METHOD__ |
970 | 970 | ); |
971 | 971 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -992,9 +992,9 @@ discard block |
||
992 | 992 | if ($siteId === null) { |
993 | 993 | $siteId = Craft::$app->getSites()->currentSite->id ?? 1; |
994 | 994 | } |
995 | - TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId); |
|
995 | + TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId); |
|
996 | 996 | Craft::info( |
997 | - 'Meta container cache cleared: ' . $uri . ' / ' . $siteId, |
|
997 | + 'Meta container cache cleared: '.$uri.' / '.$siteId, |
|
998 | 998 | __METHOD__ |
999 | 999 | ); |
1000 | 1000 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | if ($pageInfo !== null && $pageInfo->currentPage !== null) { |
86 | 86 | // Let the meta containers know that this page is paginated |
87 | - Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage; |
|
87 | + Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage; |
|
88 | 88 | // See if we should strip the query params |
89 | 89 | $stripQueryParams = true; |
90 | 90 | $pageTrigger = Craft::$app->getConfig()->getGeneral()->pageTrigger; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if (is_array($content)) { |
158 | 158 | $headerValue = ''; |
159 | 159 | foreach ($content as $contentVal) { |
160 | - $headerValue .= ($contentVal . ','); |
|
160 | + $headerValue .= ($contentVal.','); |
|
161 | 161 | } |
162 | 162 | $headerValue = rtrim($headerValue, ','); |
163 | 163 | } else { |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | if (is_array($href)) { |
177 | 177 | $headerValue = ''; |
178 | 178 | foreach ($href as $hrefVal) { |
179 | - $headerValue .= ('<' . $hrefVal . '>' . ','); |
|
179 | + $headerValue .= ('<'.$hrefVal.'>'.','); |
|
180 | 180 | } |
181 | 181 | $headerValue = rtrim($headerValue, ','); |
182 | 182 | } else { |
183 | - $headerValue = '<' . $href . '>'; |
|
183 | + $headerValue = '<'.$href.'>'; |
|
184 | 184 | } |
185 | 185 | $headerValue .= "; rel='canonical'"; |
186 | 186 | $response->headers->add('Link', $headerValue); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | if (is_array($content)) { |
197 | 197 | $headerValue = ''; |
198 | 198 | foreach ($content as $contentVal) { |
199 | - $headerValue .= ($contentVal . ','); |
|
199 | + $headerValue .= ($contentVal.','); |
|
200 | 200 | } |
201 | 201 | $headerValue = rtrim($headerValue, ','); |
202 | 202 | } else { |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | if ($lastElement && $element) { |
383 | 383 | if ($lastElement->uri !== '__home__' && $element->uri) { |
384 | 384 | $path = $lastElement->uri; |
385 | - $segments = array_values(array_filter(explode('/', $path), function ($segment) { |
|
385 | + $segments = array_values(array_filter(explode('/', $path), function($segment) { |
|
386 | 386 | return $segment !== ''; |
387 | 387 | })); |
388 | 388 | } |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | $element = $elements->getElementByUri($url, $site->id, false); |
543 | 543 | } |
544 | 544 | if ($element !== null) { |
545 | - if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) { |
|
545 | + if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) { |
|
546 | 546 | $includeUrl = false; |
547 | 547 | } |
548 | 548 | /** @var MetaBundle $metaBundle */ |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | if (isset($value[$day][$time]) |
796 | 796 | && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false |
797 | 797 | ) { |
798 | - $normalized[$day][$time] = (array)($date); |
|
798 | + $normalized[$day][$time] = (array) ($date); |
|
799 | 799 | } else { |
800 | 800 | $normalized[$day][$time] = null; |
801 | 801 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @param MetaBundle $metaBundle |
176 | 176 | * @param bool $forceUpdate |
177 | 177 | */ |
178 | - public function syncBundleWithConfig(MetaBundle &$metaBundle, bool $forceUpdate = false) |
|
178 | + public function syncBundleWithConfig(MetaBundle & $metaBundle, bool $forceUpdate = false) |
|
179 | 179 | { |
180 | 180 | $prevMetaBundle = $metaBundle; |
181 | 181 | $config = []; |
@@ -304,8 +304,8 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public function updateMetaBundle(MetaBundle $metaBundle, int $siteId) |
306 | 306 | { |
307 | - $metaBundle->sourceName = (string)$metaBundle->sourceName; |
|
308 | - $metaBundle->sourceTemplate = (string)$metaBundle->sourceTemplate; |
|
307 | + $metaBundle->sourceName = (string) $metaBundle->sourceName; |
|
308 | + $metaBundle->sourceTemplate = (string) $metaBundle->sourceTemplate; |
|
309 | 309 | // Make sure it validates |
310 | 310 | if ($metaBundle->validate(null, true)) { |
311 | 311 | // Save it out to a record |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | 'sourceSiteId' => $siteId, |
316 | 316 | ]; |
317 | 317 | if ($metaBundle->typeId !== null) { |
318 | - $metaBundle->typeId = (int)$metaBundle->typeId; |
|
318 | + $metaBundle->typeId = (int) $metaBundle->typeId; |
|
319 | 319 | } |
320 | 320 | if (!empty($metaBundle->typeId)) { |
321 | 321 | $params['typeId'] = $metaBundle->typeId; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | // @TODO remove this hack that doesn't allow environment-transformed settings to be saved in a meta bundle with a proper system to address it |
332 | 332 | // The issue was that the containers were getting saved to the db with a hard-coded setting in them, because they'd |
333 | 333 | // been set that way by the environment, whereas to be changeable via the GUI, it needs to be set to {seomatic.meta.robots} |
334 | - $robotsTag = $metaBundle->metaContainers[MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE]->data['robots'] ?? null; |
|
334 | + $robotsTag = $metaBundle->metaContainers[MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE]->data['robots'] ?? null; |
|
335 | 335 | if (!empty($robotsTag)) { |
336 | 336 | $robotsTag->content = $robotsTag->environment['live']['content'] ?? '{seomatic.meta.robots}'; |
337 | 337 | } |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | $metaBundleDefaults = ArrayHelper::merge( |
414 | 414 | $seoElement::metaBundleConfig($sourceModel), |
415 | 415 | [ |
416 | - 'sourceTemplate' => (string)$siteSetting->template, |
|
416 | + 'sourceTemplate' => (string) $siteSetting->template, |
|
417 | 417 | 'sourceSiteId' => $siteSetting->siteId, |
418 | 418 | 'sourceAltSiteSettings' => $siteSettingsArray, |
419 | 419 | 'sourceDateUpdated' => $dateUpdated, |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | public function getMetaBundleBySourceHandle(string $sourceBundleType, string $sourceHandle, int $sourceSiteId, $typeId = null) |
462 | 462 | { |
463 | 463 | $metaBundle = null; |
464 | - $typeId = (int)$typeId; |
|
464 | + $typeId = (int) $typeId; |
|
465 | 465 | // See if we have the meta bundle cached |
466 | 466 | if (!empty($this->metaBundlesBySourceHandle[$sourceBundleType][$sourceHandle][$sourceSiteId][$typeId])) { |
467 | 467 | $id = $this->metaBundlesBySourceHandle[$sourceBundleType][$sourceHandle][$sourceSiteId][$typeId]; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | /** @var Section|CategoryGroup|ProductType $sourceModel */ |
549 | 549 | $sourceModel = $seoElement::sourceModelFromId($sourceId); |
550 | 550 | if ($sourceModel !== null) { |
551 | - $metaBundle->sourceName = (string)$sourceModel->name; |
|
551 | + $metaBundle->sourceName = (string) $sourceModel->name; |
|
552 | 552 | $metaBundle->sourceHandle = $sourceModel->handle; |
553 | 553 | } |
554 | 554 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | public function getMetaBundleBySourceId(string $sourceBundleType, int $sourceId, int $sourceSiteId, $typeId = null) |
589 | 589 | { |
590 | 590 | $metaBundle = null; |
591 | - $typeId = (int)$typeId; |
|
591 | + $typeId = (int) $typeId; |
|
592 | 592 | // See if we have the meta bundle cached |
593 | 593 | if (!empty($this->metaBundlesBySourceId[$sourceBundleType][$sourceId][$sourceSiteId][$typeId])) { |
594 | 594 | $id = $this->metaBundlesBySourceId[$sourceBundleType][$sourceId][$sourceSiteId][$typeId]; |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | ->from(['{{%seomatic_metabundles}}']) |
785 | 785 | ->where(['=', 'sourceBundleType', $seoElement::META_BUNDLE_TYPE]); |
786 | 786 | |
787 | - if ((int)$sourceSiteId !== 0) { |
|
787 | + if ((int) $sourceSiteId !== 0) { |
|
788 | 788 | $subQuery->andWhere(['sourceSiteId' => $sourceSiteId]); |
789 | 789 | } |
790 | 790 | if ($filter !== '') { |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | public function getContentMetaBundleForElement(Element $element) |
822 | 822 | { |
823 | 823 | $source = $this->getMetaSourceFromElement($element); |
824 | - $key = implode(".", $source) . '.' . $element->siteId; |
|
824 | + $key = implode(".", $source).'.'.$element->siteId; |
|
825 | 825 | |
826 | 826 | if (empty($this->elementContentMetaBundles[$key])) { |
827 | 827 | $this->elementContentMetaBundles[$key] = $this->getMetaBundleBySourceId($source[1], $source[0], $element->siteId, $source[4]); |