@@ -21,11 +21,11 @@ |
||
21 | 21 | */ |
22 | 22 | |
23 | 23 | return [ |
24 | - MetaLinkContainer::CONTAINER_TYPE . LinkService::GENERAL_HANDLE => [ |
|
24 | + MetaLinkContainer::CONTAINER_TYPE.LinkService::GENERAL_HANDLE => [ |
|
25 | 25 | 'name' => 'General', |
26 | 26 | 'description' => 'Link Tags', |
27 | 27 | 'handle' => LinkService::GENERAL_HANDLE, |
28 | - 'class' => (string)MetaLinkContainer::class, |
|
28 | + 'class' => (string) MetaLinkContainer::class, |
|
29 | 29 | 'include' => true, |
30 | 30 | 'dependencies' => [ |
31 | 31 | ], |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | return [ |
23 | - MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [ |
|
23 | + MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [ |
|
24 | 24 | 'name' => 'General', |
25 | 25 | 'description' => 'General Meta Tags', |
26 | 26 | 'handle' => TagService::GENERAL_HANDLE, |
27 | - 'class' => (string)MetaTagContainer::class, |
|
27 | + 'class' => (string) MetaTagContainer::class, |
|
28 | 28 | 'include' => true, |
29 | 29 | 'dependencies' => [ |
30 | 30 | ], |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | ], |
77 | 77 | ], |
78 | 78 | ], |
79 | - MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [ |
|
79 | + MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [ |
|
80 | 80 | 'name' => 'Facebook', |
81 | 81 | 'description' => 'Facebook OpenGraph Meta Tags', |
82 | 82 | 'handle' => TagService::FACEBOOK_HANDLE, |
83 | - 'class' => (string)MetaTagContainer::class, |
|
83 | + 'class' => (string) MetaTagContainer::class, |
|
84 | 84 | 'include' => true, |
85 | 85 | 'dependencies' => [ |
86 | 86 | ], |
@@ -206,12 +206,12 @@ discard block |
||
206 | 206 | ], |
207 | 207 | ], |
208 | 208 | ], |
209 | - MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [ |
|
209 | + MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [ |
|
210 | 210 | 'name' => 'Twitter', |
211 | 211 | 'description' => 'Twitter Card Meta Tags', |
212 | 212 | 'handle' => TagService::TWITTER_HANDLE, |
213 | 213 | 'include' => true, |
214 | - 'class' => (string)MetaTagContainer::class, |
|
214 | + 'class' => (string) MetaTagContainer::class, |
|
215 | 215 | 'dependencies' => [ |
216 | 216 | Dependency::SITE_DEPENDENCY => ['twitterHandle'], |
217 | 217 | ], |
@@ -290,11 +290,11 @@ discard block |
||
290 | 290 | ], |
291 | 291 | ], |
292 | 292 | ], |
293 | - MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [ |
|
293 | + MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [ |
|
294 | 294 | 'name' => 'Miscellaneous', |
295 | 295 | 'description' => 'Miscellaneous Meta Tags', |
296 | 296 | 'handle' => TagService::MISC_HANDLE, |
297 | - 'class' => (string)MetaTagContainer::class, |
|
297 | + 'class' => (string) MetaTagContainer::class, |
|
298 | 298 | 'include' => true, |
299 | 299 | 'dependencies' => [ |
300 | 300 | ], |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | { |
65 | 65 | $baseUrl = UrlHelper::hostInfo(UrlHelper::siteUrl($path)); |
66 | 66 | |
67 | - return rtrim($baseUrl, '/') . '/' . ltrim($path, '/'); |
|
67 | + return rtrim($baseUrl, '/').'/'.ltrim($path, '/'); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $metaSiteVars = Seomatic::$plugin->metaContainers->metaSiteVars; |
109 | 109 | if ($metaSiteVars && !empty($metaSiteVars->siteLinksQueryInput)) { |
110 | - $result = 'required name=' . $metaSiteVars->siteLinksQueryInput; |
|
110 | + $result = 'required name='.$metaSiteVars->siteLinksQueryInput; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return $result; |
@@ -568,8 +568,8 @@ discard block |
||
568 | 568 | */ |
569 | 569 | public function isInherited(InheritableSettingsModel $settingCollection, $settingName) |
570 | 570 | { |
571 | - $explicitInherit = array_key_exists($settingName, (array)$settingCollection->inherited); |
|
572 | - $explicitOverride = array_key_exists($settingName, (array)$settingCollection->overrides); |
|
571 | + $explicitInherit = array_key_exists($settingName, (array) $settingCollection->inherited); |
|
572 | + $explicitOverride = array_key_exists($settingName, (array) $settingCollection->overrides); |
|
573 | 573 | |
574 | 574 | if ($explicitInherit || $explicitOverride) { |
575 | 575 | return $explicitInherit && !$explicitOverride; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function add($metaItem, string $handle = self::GENERAL_HANDLE) |
67 | 67 | { |
68 | - $key = MetaTitleContainer::CONTAINER_TYPE . $handle; |
|
68 | + $key = MetaTitleContainer::CONTAINER_TYPE.$handle; |
|
69 | 69 | Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key); |
70 | 70 | |
71 | 71 | /** @var MetaTitle $metaItem */ |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function container(string $handle = self::GENERAL_HANDLE) |
91 | 91 | { |
92 | - $key = MetaTitleContainer::CONTAINER_TYPE . $handle; |
|
92 | + $key = MetaTitleContainer::CONTAINER_TYPE.$handle; |
|
93 | 93 | |
94 | 94 | return Seomatic::$plugin->metaContainers->getMetaContainer($key); |
95 | 95 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function add($metaItem, string $handle = self::GENERAL_HANDLE) |
78 | 78 | { |
79 | - $key = MetaTagContainer::CONTAINER_TYPE . $handle; |
|
79 | + $key = MetaTagContainer::CONTAINER_TYPE.$handle; |
|
80 | 80 | Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key); |
81 | 81 | |
82 | 82 | /** @var MetaTag $metaItem */ |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function container(string $handle = self::GENERAL_HANDLE) |
102 | 102 | { |
103 | - $key = MetaTagContainer::CONTAINER_TYPE . $handle; |
|
103 | + $key = MetaTagContainer::CONTAINER_TYPE.$handle; |
|
104 | 104 | |
105 | 105 | return Seomatic::$plugin->metaContainers->getMetaContainer($key); |
106 | 106 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function add($metaItem, string $handle = self::GENERAL_HANDLE) |
67 | 67 | { |
68 | - $key = MetaScriptContainer::CONTAINER_TYPE . $handle; |
|
68 | + $key = MetaScriptContainer::CONTAINER_TYPE.$handle; |
|
69 | 69 | Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key); |
70 | 70 | |
71 | 71 | /** @var MetaScript $metaItem */ |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function container(string $handle = self::GENERAL_HANDLE) |
91 | 91 | { |
92 | - $key = MetaScriptContainer::CONTAINER_TYPE . $handle; |
|
92 | + $key = MetaScriptContainer::CONTAINER_TYPE.$handle; |
|
93 | 93 | |
94 | 94 | return Seomatic::$plugin->metaContainers->getMetaContainer($key); |
95 | 95 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function add($metaItem, string $handle = self::GENERAL_HANDLE): MetaJsonLd |
74 | 74 | { |
75 | - $key = MetaJsonLdContainer::CONTAINER_TYPE . $handle; |
|
75 | + $key = MetaJsonLdContainer::CONTAINER_TYPE.$handle; |
|
76 | 76 | Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key); |
77 | 77 | |
78 | 78 | /** @var MetaJsonLd $metaItem */ |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function container(string $handle = self::GENERAL_HANDLE) |
98 | 98 | { |
99 | - $key = MetaJsonLdContainer::CONTAINER_TYPE . $handle; |
|
99 | + $key = MetaJsonLdContainer::CONTAINER_TYPE.$handle; |
|
100 | 100 | |
101 | 101 | return Seomatic::$plugin->metaContainers->getMetaContainer($key); |
102 | 102 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function add($metaItem, string $handle = self::GENERAL_HANDLE) |
77 | 77 | { |
78 | - $key = MetaLinkContainer::CONTAINER_TYPE . $handle; |
|
78 | + $key = MetaLinkContainer::CONTAINER_TYPE.$handle; |
|
79 | 79 | Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key); |
80 | 80 | |
81 | 81 | /** @var MetaLink $metaItem */ |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function container(string $handle = self::GENERAL_HANDLE) |
101 | 101 | { |
102 | - $key = MetaLinkContainer::CONTAINER_TYPE . $handle; |
|
102 | + $key = MetaLinkContainer::CONTAINER_TYPE.$handle; |
|
103 | 103 | |
104 | 104 | return Seomatic::$plugin->metaContainers->getMetaContainer($key); |
105 | 105 | } |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | // Constants |
43 | 43 | // ========================================================================= |
44 | 44 | |
45 | - const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapIndexTemplate::TEMPLATE_TYPE; |
|
45 | + const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapIndexTemplate::TEMPLATE_TYPE; |
|
46 | 46 | |
47 | - const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapTemplate::TEMPLATE_TYPE; |
|
47 | + const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapTemplate::TEMPLATE_TYPE; |
|
48 | 48 | |
49 | - const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapCustomTemplate::TEMPLATE_TYPE; |
|
49 | + const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapCustomTemplate::TEMPLATE_TYPE; |
|
50 | 50 | |
51 | 51 | const SEARCH_ENGINE_SUBMISSION_URLS = [ |
52 | 52 | 'google' => 'https://www.google.com/ping?sitemap=', |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | Event::on( |
92 | 92 | UrlManager::class, |
93 | 93 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
94 | - function (RegisterUrlRulesEvent $event) { |
|
94 | + function(RegisterUrlRulesEvent $event) { |
|
95 | 95 | Craft::debug( |
96 | 96 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
97 | 97 | __METHOD__ |
@@ -244,19 +244,19 @@ discard block |
||
244 | 244 | $siteId = $groupSiteIds[0]; |
245 | 245 | $sitemapIndexUrl = $this->sitemapIndexUrlForSiteId($siteId); |
246 | 246 | if (!empty($sitemapIndexUrl)) { |
247 | - $submissionUrl = $url . urlencode($sitemapIndexUrl); |
|
247 | + $submissionUrl = $url.urlencode($sitemapIndexUrl); |
|
248 | 248 | // create new guzzle client |
249 | 249 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 120, 'connect_timeout' => 120]); |
250 | 250 | // Submit the sitemap index to each search engine |
251 | 251 | try { |
252 | 252 | $guzzleClient->post($submissionUrl); |
253 | 253 | Craft::info( |
254 | - 'Sitemap index submitted to: ' . $submissionUrl, |
|
254 | + 'Sitemap index submitted to: '.$submissionUrl, |
|
255 | 255 | __METHOD__ |
256 | 256 | ); |
257 | 257 | } catch (\Exception $e) { |
258 | 258 | Craft::error( |
259 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
259 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
260 | 260 | __METHOD__ |
261 | 261 | ); |
262 | 262 | } |
@@ -316,19 +316,19 @@ discard block |
||
316 | 316 | foreach ($searchEngineUrls as &$url) { |
317 | 317 | $sitemapUrl = $this->sitemapUrlForBundle($sourceBundleType, $sourceHandle, $sourceSiteId); |
318 | 318 | if (!empty($sitemapUrl)) { |
319 | - $submissionUrl = $url . urlencode($sitemapUrl); |
|
319 | + $submissionUrl = $url.urlencode($sitemapUrl); |
|
320 | 320 | // create new guzzle client |
321 | 321 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 120, 'connect_timeout' => 120]); |
322 | 322 | // Submit the sitemap index to each search engine |
323 | 323 | try { |
324 | 324 | $guzzleClient->post($submissionUrl); |
325 | 325 | Craft::info( |
326 | - 'Sitemap index submitted to: ' . $submissionUrl, |
|
326 | + 'Sitemap index submitted to: '.$submissionUrl, |
|
327 | 327 | __METHOD__ |
328 | 328 | ); |
329 | 329 | } catch (\Exception $e) { |
330 | 330 | Craft::error( |
331 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
331 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
332 | 332 | __METHOD__ |
333 | 333 | ); |
334 | 334 | } |
@@ -394,19 +394,19 @@ discard block |
||
394 | 394 | foreach ($searchEngineUrls as &$url) { |
395 | 395 | $sitemapUrl = $this->sitemapCustomUrlForSiteId($siteId); |
396 | 396 | if (!empty($sitemapUrl)) { |
397 | - $submissionUrl = $url . urlencode($sitemapUrl); |
|
397 | + $submissionUrl = $url.urlencode($sitemapUrl); |
|
398 | 398 | // create new guzzle client |
399 | 399 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 120, 'connect_timeout' => 120]); |
400 | 400 | // Submit the sitemap index to each search engine |
401 | 401 | try { |
402 | 402 | $guzzleClient->post($submissionUrl); |
403 | 403 | Craft::info( |
404 | - 'Sitemap Custom submitted to: ' . $submissionUrl, |
|
404 | + 'Sitemap Custom submitted to: '.$submissionUrl, |
|
405 | 405 | __METHOD__ |
406 | 406 | ); |
407 | 407 | } catch (\Exception $e) { |
408 | 408 | Craft::error( |
409 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
409 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
410 | 410 | __METHOD__ |
411 | 411 | ); |
412 | 412 | } |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | } |
485 | 485 | |
486 | 486 | foreach ($sites as $site) { |
487 | - $result .= 'sitemap: ' . $this->sitemapIndexUrlForSiteId($site->id) . PHP_EOL; |
|
487 | + $result .= 'sitemap: '.$this->sitemapIndexUrlForSiteId($site->id).PHP_EOL; |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | return rtrim($result, PHP_EOL); |
@@ -516,9 +516,9 @@ discard block |
||
516 | 516 | // Since we want a stale-while-revalidate pattern, only invalidate the cache if we're asked to |
517 | 517 | if ($invalidateCache) { |
518 | 518 | $cache = Craft::$app->getCache(); |
519 | - TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG . $handle . $siteId); |
|
519 | + TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG.$handle.$siteId); |
|
520 | 520 | Craft::info( |
521 | - 'Sitemap cache cleared: ' . $handle, |
|
521 | + 'Sitemap cache cleared: '.$handle, |
|
522 | 522 | __METHOD__ |
523 | 523 | ); |
524 | 524 | } |