@@ -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 | 'humans', |
35 | 35 | 'robots', |
36 | 36 | 'ads', |
@@ -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 | /** |