@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $metaBundle->metaSitemapVars->sitemapLimit = null; |
138 | 138 | } |
139 | 139 | $totalElements = $seoElement::sitemapElementsQuery($metaBundle)->count(); |
140 | - if ($metaBundle->metaSitemapVars->sitemapLimit && ($totalElements > $metaBundle->metaSitemapVars->sitemapLimit)) { |
|
140 | + if ($metaBundle->metaSitemapVars->sitemapLimit && ($totalElements > $metaBundle->metaSitemapVars->sitemapLimit)) { |
|
141 | 141 | $totalElements = $metaBundle->metaSitemapVars->sitemapLimit; |
142 | 142 | } |
143 | 143 | } |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | while ($currentElement < $totalElements) { |
160 | 160 | $elements = $paginator->getPageResults(); |
161 | 161 | if (Craft::$app instanceof ConsoleApplication) { |
162 | - echo 'Query ' . $paginator->getCurrentPage() . '/' . $paginator->getTotalPages() |
|
163 | - . ' - elements: ' . $paginator->getTotalResults() |
|
162 | + echo 'Query '.$paginator->getCurrentPage().'/'.$paginator->getTotalPages() |
|
163 | + . ' - elements: '.$paginator->getTotalResults() |
|
164 | 164 | . PHP_EOL; |
165 | 165 | } |
166 | 166 | /** @var ElementInterface $element */ |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | $canonicalUrl = UrlHelper::absoluteUrlWithProtocol($canonicalUrl); |
206 | 206 | if ($url !== $canonicalUrl) { |
207 | - Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - " . $metaBundle->metaGlobalVars->canonicalUrl . " - " . $element->uri); |
|
207 | + Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - ".$metaBundle->metaGlobalVars->canonicalUrl." - ".$element->uri); |
|
208 | 208 | continue; |
209 | 209 | } |
210 | 210 | } |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | */ |
510 | 510 | protected function assetSitemapItem(Asset $asset, MetaBundle $metaBundle, array &$lines) |
511 | 511 | { |
512 | - if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) { |
|
512 | + if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) { |
|
513 | 513 | switch ($asset->kind) { |
514 | 514 | case 'image': |
515 | 515 | $lines[] = '<image:image>'; |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | */ |
558 | 558 | protected function assetFilesSitemapLink(Asset $asset, MetaBundle $metaBundle, array &$lines) |
559 | 559 | { |
560 | - if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) { |
|
560 | + if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) { |
|
561 | 561 | if (\in_array($asset->kind, SitemapTemplate::FILE_TYPES, false)) { |
562 | 562 | $dateUpdated = $asset->dateUpdated ?? $asset->dateCreated ?? new \DateTime; |
563 | 563 | $lines[] = '<url>'; |