@@ -106,7 +106,7 @@ |
||
106 | 106 | ); |
107 | 107 | // Rename keys as appropriate |
108 | 108 | foreach (self::AT_PREFIXED_ATTRIBUTES as $key) { |
109 | - $array = self::changeKey($array, $key, '@' . $key); |
|
109 | + $array = self::changeKey($array, $key, '@'.$key); |
|
110 | 110 | } |
111 | 111 | if ($depth > 1) { |
112 | 112 | foreach (self::IGNORE_ATTRIBUTES as $attribute) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | if ($pageInfo !== null && $pageInfo->currentPage !== null) { |
85 | 85 | // Let the meta containers know that this page is paginated |
86 | - Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage; |
|
86 | + Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage; |
|
87 | 87 | // See if we should strip the query params |
88 | 88 | $stripQueryParams = true; |
89 | 89 | $pageTrigger = Craft::$app->getConfig()->getGeneral()->pageTrigger; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | if (is_array($content)) { |
160 | 160 | $headerValue = ''; |
161 | 161 | foreach ($content as $contentVal) { |
162 | - $headerValue .= ($contentVal . ','); |
|
162 | + $headerValue .= ($contentVal.','); |
|
163 | 163 | } |
164 | 164 | $headerValue = rtrim($headerValue, ','); |
165 | 165 | } else { |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | if (is_array($href)) { |
179 | 179 | $headerValue = ''; |
180 | 180 | foreach ($href as $hrefVal) { |
181 | - $headerValue .= ('<' . $hrefVal . '>' . ','); |
|
181 | + $headerValue .= ('<'.$hrefVal.'>'.','); |
|
182 | 182 | } |
183 | 183 | $headerValue = rtrim($headerValue, ','); |
184 | 184 | } else { |
185 | - $headerValue = '<' . $href . '>'; |
|
185 | + $headerValue = '<'.$href.'>'; |
|
186 | 186 | } |
187 | 187 | $headerValue .= "; rel='canonical'"; |
188 | 188 | $response->headers->add('Link', $headerValue); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | if (is_array($content)) { |
199 | 199 | $headerValue = ''; |
200 | 200 | foreach ($content as $contentVal) { |
201 | - $headerValue .= ($contentVal . ','); |
|
201 | + $headerValue .= ($contentVal.','); |
|
202 | 202 | } |
203 | 203 | $headerValue = rtrim($headerValue, ','); |
204 | 204 | } else { |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | } |
593 | 593 | } |
594 | 594 | // Never include the URL if the element isn't enabled for the site |
595 | - if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) { |
|
595 | + if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) { |
|
596 | 596 | $includeUrl = false; |
597 | 597 | } |
598 | 598 | } else { |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | if (isset($value[$day][$time]) |
802 | 802 | && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false |
803 | 803 | ) { |
804 | - $normalized[$day][$time] = (array)($date); |
|
804 | + $normalized[$day][$time] = (array) ($date); |
|
805 | 805 | } else { |
806 | 806 | $normalized[$day][$time] = null; |
807 | 807 | } |
@@ -80,24 +80,24 @@ |
||
80 | 80 | $metaContainers = Seomatic::$plugin->metaContainers; |
81 | 81 | // Get our cache key |
82 | 82 | $asArrayKey = $asArray ? 'true' : 'false'; |
83 | - $cacheKey = $uri . $siteId . implode($containerKeys) . $asArrayKey . Seomatic::$environment; |
|
83 | + $cacheKey = $uri.$siteId.implode($containerKeys).$asArrayKey.Seomatic::$environment; |
|
84 | 84 | // Load the meta containers |
85 | 85 | $dependency = new TagDependency([ |
86 | 86 | 'tags' => [ |
87 | 87 | $metaContainers::GLOBAL_METACONTAINER_CACHE_TAG, |
88 | - $metaContainers::METACONTAINER_CACHE_TAG . $sourceId . $sourceBundleType . $siteId, |
|
89 | - $metaContainers::METACONTAINER_CACHE_TAG . $uri . $siteId, |
|
90 | - $metaContainers::METACONTAINER_CACHE_TAG . $cacheKey, |
|
88 | + $metaContainers::METACONTAINER_CACHE_TAG.$sourceId.$sourceBundleType.$siteId, |
|
89 | + $metaContainers::METACONTAINER_CACHE_TAG.$uri.$siteId, |
|
90 | + $metaContainers::METACONTAINER_CACHE_TAG.$cacheKey, |
|
91 | 91 | ], |
92 | 92 | ]); |
93 | 93 | |
94 | 94 | $cache = Craft::$app->getCache(); |
95 | 95 | $result = $cache->getOrSet( |
96 | - self::CACHE_KEY . $cacheKey, |
|
96 | + self::CACHE_KEY.$cacheKey, |
|
97 | 97 | function() use ($uri, $siteId, $containerKeys, $asArray) { |
98 | 98 | $result = []; |
99 | 99 | Craft::info( |
100 | - 'Meta controller container cache miss: ' . $uri . '/' . $siteId, |
|
100 | + 'Meta controller container cache miss: '.$uri.'/'.$siteId, |
|
101 | 101 | __METHOD__ |
102 | 102 | ); |
103 | 103 | // Load the meta containers and parse our globals |
@@ -64,11 +64,11 @@ |
||
64 | 64 | { |
65 | 65 | //$this->getNode('expr1')->setAttribute('always_defined', true); |
66 | 66 | $compiler |
67 | - ->raw('((' . self::class . '::empty(') |
|
67 | + ->raw('(('.self::class.'::empty(') |
|
68 | 68 | ->subcompile($this->getNode('left')) |
69 | 69 | ->raw(') ? null : ') |
70 | 70 | ->subcompile($this->getNode('left')) |
71 | - ->raw(') ?? (' . self::class . '::empty(') |
|
71 | + ->raw(') ?? ('.self::class.'::empty(') |
|
72 | 72 | ->subcompile($this->getNode('right')) |
73 | 73 | ->raw(') ? null : ') |
74 | 74 | ->subcompile($this->getNode('right')) |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $model->addError( |
45 | 45 | $attribute, |
46 | 46 | Craft::t('seomatic', 'Object failed to validate') |
47 | - . '-' . $attributeError . ' - ' . $valueError |
|
47 | + . '-'.$attributeError.' - '.$valueError |
|
48 | 48 | ); |
49 | 49 | } |
50 | 50 | } |
@@ -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 | ], |
@@ -19,44 +19,44 @@ |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | return [ |
22 | - MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [ |
|
22 | + MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [ |
|
23 | 23 | 'name' => 'General', |
24 | 24 | 'description' => 'General Meta Tags', |
25 | 25 | 'handle' => TagService::GENERAL_HANDLE, |
26 | - 'class' => (string)MetaTagContainer::class, |
|
26 | + 'class' => (string) MetaTagContainer::class, |
|
27 | 27 | 'include' => true, |
28 | 28 | 'dependencies' => [ |
29 | 29 | ], |
30 | 30 | 'data' => [ |
31 | 31 | ], |
32 | 32 | ], |
33 | - MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [ |
|
33 | + MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [ |
|
34 | 34 | 'name' => 'Facebook', |
35 | 35 | 'description' => 'Facebook OpenGraph Meta Tags', |
36 | 36 | 'handle' => TagService::FACEBOOK_HANDLE, |
37 | - 'class' => (string)MetaTagContainer::class, |
|
37 | + 'class' => (string) MetaTagContainer::class, |
|
38 | 38 | 'include' => true, |
39 | 39 | 'dependencies' => [ |
40 | 40 | ], |
41 | 41 | 'data' => [ |
42 | 42 | ], |
43 | 43 | ], |
44 | - MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [ |
|
44 | + MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [ |
|
45 | 45 | 'name' => 'Twitter', |
46 | 46 | 'description' => 'Twitter Card Meta Tags', |
47 | 47 | 'handle' => TagService::TWITTER_HANDLE, |
48 | - 'class' => (string)MetaTagContainer::class, |
|
48 | + 'class' => (string) MetaTagContainer::class, |
|
49 | 49 | 'include' => true, |
50 | 50 | 'dependencies' => [ |
51 | 51 | ], |
52 | 52 | 'data' => [ |
53 | 53 | ], |
54 | 54 | ], |
55 | - MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [ |
|
55 | + MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [ |
|
56 | 56 | 'name' => 'Miscellaneous', |
57 | 57 | 'description' => 'Miscellaneous Meta Tags', |
58 | 58 | 'handle' => TagService::MISC_HANDLE, |
59 | - 'class' => (string)MetaTagContainer::class, |
|
59 | + 'class' => (string) MetaTagContainer::class, |
|
60 | 60 | 'include' => true, |
61 | 61 | 'dependencies' => [ |
62 | 62 | ], |
@@ -20,11 +20,11 @@ |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | return [ |
23 | - MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [ |
|
23 | + MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [ |
|
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 | ], |
@@ -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 | ], |