@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @inheritdoc |
32 | 32 | */ |
33 | - protected array|bool|int $allowAnonymous = [ |
|
33 | + protected array | bool | int $allowAnonymous = [ |
|
34 | 34 | 'get-type', |
35 | 35 | 'get-decomposed-type', |
36 | 36 | 'get-type-array', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * @inheritdoc |
34 | 34 | */ |
35 | - protected array|bool|int $allowAnonymous = [ |
|
35 | + protected array | bool | int $allowAnonymous = [ |
|
36 | 36 | 'social-media', |
37 | 37 | ]; |
38 | 38 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $html = ''; |
54 | 54 | |
55 | 55 | // Don't allow the preview to be accessed publicly |
56 | - $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY . $elementId); |
|
56 | + $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY.$elementId); |
|
57 | 57 | |
58 | 58 | /** @var Element $element */ |
59 | 59 | $element = Craft::$app->getElements()->getElementById($elementId, null, $siteId); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @inheritdoc |
36 | 36 | */ |
37 | - protected array|bool|int $allowAnonymous = [ |
|
37 | + protected array | bool | int $allowAnonymous = [ |
|
38 | 38 | 'seo-file-link', |
39 | 39 | ]; |
40 | 40 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | // Add the Link header |
85 | 85 | if (!empty($canonical)) { |
86 | - $headerValue = '<' . $canonical . '>; rel="canonical"'; |
|
86 | + $headerValue = '<'.$canonical.'>; rel="canonical"'; |
|
87 | 87 | $response->headers->add('Link', $headerValue); |
88 | 88 | } |
89 | 89 | // Ensure the file type is allowed |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * @var bool|array |
51 | 51 | */ |
52 | - protected array|bool|int $allowAnonymous = [ |
|
52 | + protected array | bool | int $allowAnonymous = [ |
|
53 | 53 | ]; |
54 | 54 | |
55 | 55 | // Public Methods |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function actionGenerate() |
76 | 76 | { |
77 | - echo 'Generating sitemap' . PHP_EOL; |
|
77 | + echo 'Generating sitemap'.PHP_EOL; |
|
78 | 78 | if ($this->siteId !== null) { |
79 | 79 | $siteIds[] = $this->siteId; |
80 | 80 | } else { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ]); |
117 | 117 | } |
118 | 118 | |
119 | - echo '---' . PHP_EOL; |
|
119 | + echo '---'.PHP_EOL; |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $suffix = ''; |
126 | 126 | break; |
127 | 127 | } |
128 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
128 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
129 | 129 | // Truncate the twitter:title tag content |
130 | 130 | $truncLen = Seomatic::$settings->maxTitleLength - $lengthAdjust; |
131 | 131 | if ($truncLen < 0) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | '…' |
139 | 139 | ); |
140 | 140 | } |
141 | - $data['content'] = $prefix . $data['content'] . $suffix; |
|
141 | + $data['content'] = $prefix.$data['content'].$suffix; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return $shouldRender; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $suffix = ''; |
126 | 126 | break; |
127 | 127 | } |
128 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
128 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
129 | 129 | // Truncate the og:title tag content |
130 | 130 | $truncLen = Seomatic::$settings->maxTitleLength - $lengthAdjust; |
131 | 131 | if ($truncLen < 0) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | '…' |
139 | 139 | ); |
140 | 140 | } |
141 | - $data['content'] = $prefix . $data['content'] . $suffix; |
|
141 | + $data['content'] = $prefix.$data['content'].$suffix; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return $shouldRender; |
@@ -143,16 +143,16 @@ discard block |
||
143 | 143 | break; |
144 | 144 | } |
145 | 145 | // Handle the case of empty titles |
146 | - if ($prefix === (' ' . $separator . ' ')) { |
|
146 | + if ($prefix === (' '.$separator.' ')) { |
|
147 | 147 | $prefix = ''; |
148 | 148 | } |
149 | - if ($suffix === (' ' . $separator)) { |
|
149 | + if ($suffix === (' '.$separator)) { |
|
150 | 150 | $suffix = ''; |
151 | 151 | } |
152 | 152 | // Remove potential double spaces |
153 | 153 | $prefix = preg_replace('/\s+/', ' ', $prefix); |
154 | 154 | $suffix = preg_replace('/\s+/', ' ', $suffix); |
155 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
155 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
156 | 156 | // Parse the data |
157 | 157 | $scenario = $this->scenario; |
158 | 158 | $this->setScenario('render'); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | '…' |
172 | 172 | ); |
173 | 173 | } |
174 | - $data = $prefix . $data . $suffix; |
|
174 | + $data = $prefix.$data.$suffix; |
|
175 | 175 | } else { |
176 | 176 | // If no title is provided, just use the site name |
177 | 177 | $data = MetaValueHelper::parseString($this->siteName); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $data = trim($data); |
181 | 181 | // devMode |
182 | 182 | if (Seomatic::$devMode) { |
183 | - $data = Seomatic::$settings->devModeTitlePrefix . $data; |
|
183 | + $data = Seomatic::$settings->devModeTitlePrefix.$data; |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $result = MetaValueHelper::parseString($this->$property); |
55 | 55 | } |
56 | 56 | |
57 | - return (string)$result; |
|
57 | + return (string) $result; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -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 | 'data' => [ |
216 | 216 | 'twitter:card' => [ |
217 | 217 | 'charset' => '', |
@@ -287,11 +287,11 @@ discard block |
||
287 | 287 | ], |
288 | 288 | ], |
289 | 289 | ], |
290 | - MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [ |
|
290 | + MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [ |
|
291 | 291 | 'name' => 'Miscellaneous', |
292 | 292 | 'description' => 'Miscellaneous Meta Tags', |
293 | 293 | 'handle' => TagService::MISC_HANDLE, |
294 | - 'class' => (string)MetaTagContainer::class, |
|
294 | + 'class' => (string) MetaTagContainer::class, |
|
295 | 295 | 'include' => true, |
296 | 296 | 'dependencies' => [ |
297 | 297 | ], |