@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | // Get the page number of this request |
161 | 161 | $request = Craft::$app->getRequest(); |
162 | 162 | if (!$request->isConsoleRequest) { |
163 | - $this->paginationPage = (string)$request->pageNum; |
|
163 | + $this->paginationPage = (string) $request->pageNum; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
@@ -222,10 +222,10 @@ discard block |
||
222 | 222 | $dependency = $this->containerDependency; |
223 | 223 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; |
224 | 224 | list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet( |
225 | - self::GLOBALS_CACHE_KEY . $uniqueKey, |
|
226 | - function () use ($uniqueKey) { |
|
225 | + self::GLOBALS_CACHE_KEY.$uniqueKey, |
|
226 | + function() use ($uniqueKey) { |
|
227 | 227 | Craft::info( |
228 | - self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey, |
|
228 | + self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey, |
|
229 | 229 | __METHOD__ |
230 | 230 | ); |
231 | 231 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | ?? 1; |
347 | 347 | } |
348 | 348 | // Handle pagination |
349 | - $paginationPage = 'page' . $this->paginationPage; |
|
349 | + $paginationPage = 'page'.$this->paginationPage; |
|
350 | 350 | // Get the path for the current request |
351 | 351 | $request = Craft::$app->getRequest(); |
352 | 352 | $requestPath = '/'; |
@@ -362,21 +362,21 @@ discard block |
||
362 | 362 | } |
363 | 363 | } |
364 | 364 | // Get our cache key |
365 | - $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams(); |
|
365 | + $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams(); |
|
366 | 366 | // For requests with a status code of >= 400, use one cache key |
367 | 367 | if (!$request->isConsoleRequest) { |
368 | 368 | $response = Craft::$app->getResponse(); |
369 | 369 | if ($response->statusCode >= 400) { |
370 | - $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode; |
|
370 | + $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode; |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | // Load the meta containers |
374 | 374 | $dependency = new TagDependency([ |
375 | 375 | 'tags' => [ |
376 | 376 | self::GLOBAL_METACONTAINER_CACHE_TAG, |
377 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId, |
|
378 | - self::METACONTAINER_CACHE_TAG . $uri . $siteId, |
|
379 | - self::METACONTAINER_CACHE_TAG . $cacheKey, |
|
377 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId, |
|
378 | + self::METACONTAINER_CACHE_TAG.$uri.$siteId, |
|
379 | + self::METACONTAINER_CACHE_TAG.$cacheKey, |
|
380 | 380 | ], |
381 | 381 | ]); |
382 | 382 | $this->containerDependency = $dependency; |
@@ -392,10 +392,10 @@ discard block |
||
392 | 392 | } else { |
393 | 393 | $cache = Craft::$app->getCache(); |
394 | 394 | list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet( |
395 | - self::CACHE_KEY . $cacheKey, |
|
396 | - function () use ($uri, $siteId) { |
|
395 | + self::CACHE_KEY.$cacheKey, |
|
396 | + function() use ($uri, $siteId) { |
|
397 | 397 | Craft::info( |
398 | - 'Meta container cache miss: ' . $uri . '/' . $siteId, |
|
398 | + 'Meta container cache miss: '.$uri.'/'.$siteId, |
|
399 | 399 | __METHOD__ |
400 | 400 | ); |
401 | 401 | $this->loadGlobalMetaContainers($siteId); |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | |
665 | 665 | // Handle re-creating the `mainEntityOfPage` so that the model injected into the |
666 | 666 | // templates has the appropriate attributes |
667 | - $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE; |
|
667 | + $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE; |
|
668 | 668 | $generalContainer = $this->metaContainers[$generalContainerKey]; |
669 | 669 | if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) { |
670 | 670 | /** @var MetaJsonLd $jsonLdModel */ |
@@ -916,10 +916,10 @@ discard block |
||
916 | 916 | $cache = Craft::$app->getCache(); |
917 | 917 | TagDependency::invalidate( |
918 | 918 | $cache, |
919 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId |
|
919 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId |
|
920 | 920 | ); |
921 | 921 | Craft::info( |
922 | - 'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId, |
|
922 | + 'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId, |
|
923 | 923 | __METHOD__ |
924 | 924 | ); |
925 | 925 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -946,9 +946,9 @@ discard block |
||
946 | 946 | if ($siteId === null) { |
947 | 947 | $siteId = Craft::$app->getSites()->currentSite->id ?? 1; |
948 | 948 | } |
949 | - TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId); |
|
949 | + TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId); |
|
950 | 950 | Craft::info( |
951 | - 'Meta container cache cleared: ' . $uri . ' / ' . $siteId, |
|
951 | + 'Meta container cache cleared: '.$uri.' / '.$siteId, |
|
952 | 952 | __METHOD__ |
953 | 953 | ); |
954 | 954 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -24,7 +24,7 @@ |
||
24 | 24 | 'name' => 'General', |
25 | 25 | 'description' => 'Script Tags', |
26 | 26 | 'handle' => ScriptService::GENERAL_HANDLE, |
27 | - 'class' => (string)MetaScriptContainer::class, |
|
27 | + 'class' => (string) MetaScriptContainer::class, |
|
28 | 28 | 'include' => true, |
29 | 29 | 'dependencies' => [ |
30 | 30 | ], |
@@ -19,11 +19,11 @@ |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | return [ |
22 | - MetaTitleContainer::CONTAINER_TYPE . TitleService::GENERAL_HANDLE => [ |
|
22 | + MetaTitleContainer::CONTAINER_TYPE.TitleService::GENERAL_HANDLE => [ |
|
23 | 23 | 'name' => 'General', |
24 | 24 | 'description' => 'Meta Title Tag', |
25 | 25 | 'handle' => TitleService::GENERAL_HANDLE, |
26 | - 'class' => (string)MetaTitleContainer::class, |
|
26 | + 'class' => (string) MetaTitleContainer::class, |
|
27 | 27 | 'include' => true, |
28 | 28 | 'dependencies' => [ |
29 | 29 | ], |
@@ -19,11 +19,11 @@ |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | return [ |
22 | - MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE => [ |
|
22 | + MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE => [ |
|
23 | 23 | 'name' => 'General', |
24 | 24 | 'description' => 'JsonLd Tags', |
25 | 25 | 'handle' => JsonLdService::GENERAL_HANDLE, |
26 | - 'class' => (string)MetaJsonLdContainer::class, |
|
26 | + 'class' => (string) MetaJsonLdContainer::class, |
|
27 | 27 | 'include' => true, |
28 | 28 | 'dependencies' => [ |
29 | 29 | ], |
@@ -24,7 +24,7 @@ |
||
24 | 24 | 'name' => 'General', |
25 | 25 | 'description' => 'Link Tags', |
26 | 26 | 'handle' => LinkService::GENERAL_HANDLE, |
27 | - 'class' => (string)MetaLinkContainer::class, |
|
27 | + 'class' => (string) MetaLinkContainer::class, |
|
28 | 28 | 'include' => true, |
29 | 29 | 'dependencies' => [ |
30 | 30 | ], |
@@ -24,7 +24,7 @@ discard block |
||
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 | ], |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'name' => 'Facebook', |
36 | 36 | 'description' => 'Facebook OpenGraph Meta Tags', |
37 | 37 | 'handle' => TagService::FACEBOOK_HANDLE, |
38 | - 'class' => (string)MetaTagContainer::class, |
|
38 | + 'class' => (string) MetaTagContainer::class, |
|
39 | 39 | 'include' => true, |
40 | 40 | 'dependencies' => [ |
41 | 41 | ], |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | 'name' => 'Twitter', |
47 | 47 | 'description' => 'Twitter Card Meta Tags', |
48 | 48 | 'handle' => TagService::TWITTER_HANDLE, |
49 | - 'class' => (string)MetaTagContainer::class, |
|
49 | + 'class' => (string) MetaTagContainer::class, |
|
50 | 50 | 'include' => true, |
51 | 51 | 'dependencies' => [ |
52 | 52 | ], |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | 'name' => 'Miscellaneous', |
58 | 58 | 'description' => 'Miscellaneous Meta Tags', |
59 | 59 | 'handle' => TagService::MISC_HANDLE, |
60 | - 'class' => (string)MetaTagContainer::class, |
|
60 | + 'class' => (string) MetaTagContainer::class, |
|
61 | 61 | 'include' => true, |
62 | 62 | 'dependencies' => [ |
63 | 63 | ], |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | Event::on(MetaContainers::class, |
48 | 48 | MetaContainers::EVENT_METABUNDLE_DEBUG_DATA, |
49 | - function (MetaBundleDebugDataEvent $e) { |
|
49 | + function(MetaBundleDebugDataEvent $e) { |
|
50 | 50 | if ($e->metaBundle) { |
51 | 51 | $this->metaBundles[$e->metaBundleCategory] = $e->metaBundle; |
52 | 52 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getSummary(): string |
69 | 69 | { |
70 | - return Craft::$app->getView()->render($this->viewPath . 'summary', ['panel' => $this]); |
|
70 | + return Craft::$app->getView()->render($this->viewPath.'summary', ['panel' => $this]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getDetail(): string |
77 | 77 | { |
78 | - return Craft::$app->getView()->render($this->viewPath . 'detail', ['panel' => $this]); |
|
78 | + return Craft::$app->getView()->render($this->viewPath.'detail', ['panel' => $this]); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $content .= $this->render('rendered-tags', [ |
165 | 165 | 'values' => [ |
166 | 166 | 'renderedTags' => $panel->data[$metaBundleCategory]['renderedTags'][$metaContainerName] ?? [], |
167 | - 'id' => $sectionName . '-' . $metaBundleCategory . '-' . $metaContainerName . '-rendered-tags', |
|
167 | + 'id' => $sectionName.'-'.$metaBundleCategory.'-'.$metaContainerName.'-rendered-tags', |
|
168 | 168 | 'view' => $this, |
169 | 169 | 'language' => $editorLanguage, |
170 | 170 | ] |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $className = MetaTag::class; |
80 | 80 | if ($tagType) { |
81 | 81 | // Potentially load a sub-type of MetaTag |
82 | - $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\' . ucfirst($tagType) . 'Tag'; |
|
82 | + $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\'.ucfirst($tagType).'Tag'; |
|
83 | 83 | /** @var $model MetaTag */ |
84 | 84 | if (class_exists($tagClassName)) { |
85 | 85 | $className = $tagClassName; |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | if (Seomatic::$devMode) { |
156 | 156 | $error = Craft::t( |
157 | 157 | 'seomatic', |
158 | - '{tagtype} tag `{key}` did not render because it is missing attributes. ' . print_r($data, true), |
|
158 | + '{tagtype} tag `{key}` did not render because it is missing attributes. '.print_r($data, true), |
|
159 | 159 | ['tagtype' => 'Meta', 'key' => $this->key] |
160 | 160 | ); |
161 | - Craft::info('WARNING - ' . $error, __METHOD__); |
|
161 | + Craft::info('WARNING - '.$error, __METHOD__); |
|
162 | 162 | } |
163 | 163 | $shouldRender = false; |
164 | 164 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | foreach ($configs as $config) { |
183 | 183 | if ($this->prepForRender($config)) { |
184 | 184 | ksort($config); |
185 | - $html .= Html::tag('meta', '', $config) . $linebreak; |
|
185 | + $html .= Html::tag('meta', '', $config).$linebreak; |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 |