Test Failed
Push — v4 ( dc2d65...c4514e )
by Andrew
22:06 queued 03:11
created
src/models/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
      *     'default' => 'http://example.com/',
209 209
      *     'spanish' => 'http://example.com/es/',
210 210
      * ],     */
211
-    public string|array $siteUrlOverride = '';
211
+    public string | array $siteUrlOverride = '';
212 212
 
213 213
     /**
214 214
      * @var int|null
Please login to merge, or discard this patch.
src/helpers/Text.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (!empty($string)) {
76 76
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
77 77
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
78
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
78
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
79 79
         }
80 80
 
81 81
         return $result;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         if (!empty($string)) {
101 101
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
102 102
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
103
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
103
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
104 104
         }
105 105
 
106 106
         return $result;
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
             $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw()));
135 135
         } else {
136 136
             if (self::isArrayLike($field)) {
137
-                $result = self::smartStripTags((string)$field[0]);
137
+                $result = self::smartStripTags((string) $field[0]);
138 138
             } else {
139
-                $result = self::smartStripTags((string)$field);
139
+                $result = self::smartStripTags((string) $field);
140 140
             }
141 141
         }
142 142
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $tags = $tags->all();
164 164
         }
165 165
         foreach ($tags as $tag) {
166
-            $result .= $tag->title . ', ';
166
+            $result .= $tag->title.', ';
167 167
         }
168 168
         $result = rtrim($result, ', ');
169 169
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                     foreach ($fieldClasses as $fieldClassKey) {
206 206
                         if ($field instanceof $fieldClassKey) {
207 207
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
208
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
208
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
209 209
                             }
210 210
                         }
211 211
                     }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                     foreach ($fieldClasses as $fieldClassKey) {
248 248
                         if ($field instanceof $fieldClassKey) {
249 249
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
250
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
250
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
251 251
                             }
252 252
                         }
253 253
                     }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                     foreach ($fieldClasses as $fieldClassKey) {
298 298
                         if ($field instanceof $fieldClassKey) {
299 299
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
300
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
300
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
301 301
                             }
302 302
                         }
303 303
                     }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
397 397
         $str = rawurldecode($str);
398 398
         // Remove any linebreaks
399
-        $str = (string)preg_replace("/\r|\n/", "", $str);
399
+        $str = (string) preg_replace("/\r|\n/", "", $str);
400 400
         $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']);
401 401
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
402 402
         // Remove any embedded Twig code
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             $language = 'English';
488 488
         }
489 489
 
490
-        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\' . ucfirst($language);
490
+        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\'.ucfirst($language);
491 491
         if (class_exists($className)) {
492 492
             $stopWords = new $className();
493 493
         }
Please login to merge, or discard this patch.
src/services/Sitemaps.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
     // Constants
44 44
     // =========================================================================
45 45
 
46
-    public const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapIndexTemplate::TEMPLATE_TYPE;
46
+    public const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapIndexTemplate::TEMPLATE_TYPE;
47 47
 
48
-    public const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapTemplate::TEMPLATE_TYPE;
48
+    public const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapTemplate::TEMPLATE_TYPE;
49 49
 
50
-    public const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapCustomTemplate::TEMPLATE_TYPE;
50
+    public const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapCustomTemplate::TEMPLATE_TYPE;
51 51
 
52 52
     public const SEARCH_ENGINE_SUBMISSION_URLS = [
53 53
     ];
@@ -238,19 +238,19 @@  discard block
 block discarded – undo
238 238
                         $siteId = $groupSiteIds[0];
239 239
                         $sitemapIndexUrl = $this->sitemapIndexUrlForSiteId($siteId);
240 240
                         if (!empty($sitemapIndexUrl)) {
241
-                            $submissionUrl = $url . urlencode($sitemapIndexUrl);
241
+                            $submissionUrl = $url.urlencode($sitemapIndexUrl);
242 242
                             // create new guzzle client
243 243
                             $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]);
244 244
                             // Submit the sitemap index to each search engine
245 245
                             try {
246 246
                                 $guzzleClient->post($submissionUrl);
247 247
                                 Craft::info(
248
-                                    'Sitemap index submitted to: ' . $submissionUrl,
248
+                                    'Sitemap index submitted to: '.$submissionUrl,
249 249
                                     __METHOD__
250 250
                                 );
251 251
                             } catch (\Exception $e) {
252 252
                                 Craft::error(
253
-                                    'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(),
253
+                                    'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(),
254 254
                                     __METHOD__
255 255
                                 );
256 256
                             }
@@ -312,19 +312,19 @@  discard block
 block discarded – undo
312 312
             foreach ($searchEngineUrls as &$url) {
313 313
                 $sitemapUrl = $this->sitemapUrlForBundle($sourceBundleType, $sourceHandle, $sourceSiteId);
314 314
                 if (!empty($sitemapUrl)) {
315
-                    $submissionUrl = $url . urlencode($sitemapUrl);
315
+                    $submissionUrl = $url.urlencode($sitemapUrl);
316 316
                     // create new guzzle client
317 317
                     $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]);
318 318
                     // Submit the sitemap index to each search engine
319 319
                     try {
320 320
                         $guzzleClient->post($submissionUrl);
321 321
                         Craft::info(
322
-                            'Sitemap index submitted to: ' . $submissionUrl,
322
+                            'Sitemap index submitted to: '.$submissionUrl,
323 323
                             __METHOD__
324 324
                         );
325 325
                     } catch (\Exception $e) {
326 326
                         Craft::error(
327
-                            'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(),
327
+                            'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(),
328 328
                             __METHOD__
329 329
                         );
330 330
                     }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                     . '-'
366 366
                     . $metaBundle->sourceSiteId
367 367
                     . '-sitemap'
368
-                    . (!empty($page) ? '-p' . $page : '')
368
+                    . (!empty($page) ? '-p'.$page : '')
369 369
                     . '.xml',
370 370
                     null,
371 371
                     null,
@@ -394,19 +394,19 @@  discard block
 block discarded – undo
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' => 5, 'connect_timeout' => 5]);
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
 block discarded – undo
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);
@@ -515,9 +515,9 @@  discard block
 block discarded – undo
515 515
     {
516 516
         // Always just invalidate the sitemap cache now, since we're doing paginated sitemaps
517 517
         $cache = Craft::$app->getCache();
518
-        TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG . $handle . $siteId);
518
+        TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG.$handle.$siteId);
519 519
         Craft::info(
520
-            'Sitemap cache cleared: ' . $handle,
520
+            'Sitemap cache cleared: '.$handle,
521 521
             __METHOD__
522 522
         );
523 523
     }
Please login to merge, or discard this patch.
src/models/SitemapTemplate.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
         }
141 141
 
142 142
         $cache = Craft::$app->getCache();
143
-        $pageCacheSuffix = 's' . (int)$metaBundle->metaSitemapVars->sitemapPageSize . 'p' . $page;
143
+        $pageCacheSuffix = 's'.(int) $metaBundle->metaSitemapVars->sitemapPageSize.'p'.$page;
144 144
 
145
-        $uniqueKey = $groupId . $type . $handle . $siteId . $pageCacheSuffix;
146
-        $cacheKey = self::CACHE_KEY . $uniqueKey;
145
+        $uniqueKey = $groupId.$type.$handle.$siteId.$pageCacheSuffix;
146
+        $cacheKey = self::CACHE_KEY.$uniqueKey;
147 147
         $result = $cache->get($cacheKey);
148 148
 
149 149
         // If the sitemap isn't cached, render it immediately
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
                 $dependency = new TagDependency([
161 161
                     'tags' => [
162 162
                         self::GLOBAL_SITEMAP_CACHE_TAG,
163
-                        self::SITEMAP_CACHE_TAG . $handle . $siteId,
164
-                        self::SITEMAP_CACHE_TAG . $handle . $siteId . $pageCacheSuffix,
163
+                        self::SITEMAP_CACHE_TAG.$handle.$siteId,
164
+                        self::SITEMAP_CACHE_TAG.$handle.$siteId.$pageCacheSuffix,
165 165
                     ],
166 166
                 ]);
167 167
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
                 // Output some info if this is a console app
175 175
                 if (Craft::$app instanceof ConsoleApplication) {
176
-                    echo 'Sitemap cache result: ' . print_r($result, true) . ' for cache key: ' . $cacheKey . PHP_EOL;
176
+                    echo 'Sitemap cache result: '.print_r($result, true).' for cache key: '.$cacheKey.PHP_EOL;
177 177
                 }
178 178
 
179 179
                 // If the FastCGI Cache Bust plugin is installed, clear its caches too
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             }
188 188
         } else {
189 189
             if (Craft::$app instanceof ConsoleApplication) {
190
-                echo 'Found in cache' . PHP_EOL;
190
+                echo 'Found in cache'.PHP_EOL;
191 191
             }
192 192
         }
193 193
 
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
     public function invalidateCache(string $handle, int $siteId)
204 204
     {
205 205
         $cache = Craft::$app->getCache();
206
-        TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG . $handle . $siteId);
206
+        TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG.$handle.$siteId);
207 207
         Craft::info(
208
-            'Sitemap cache cleared: ' . $handle,
208
+            'Sitemap cache cleared: '.$handle,
209 209
             __METHOD__
210 210
         );
211 211
     }
Please login to merge, or discard this patch.
src/seoelements/SeoEntry.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             ->limit($metaBundle->metaSitemapVars->sitemapLimit);
224 224
         if ($metaBundle->sourceType === 'structure'
225 225
             && !empty($metaBundle->metaSitemapVars->structureDepth)) {
226
-            $query->level('<=' . $metaBundle->metaSitemapVars->structureDepth);
226
+            $query->level('<='.$metaBundle->metaSitemapVars->structureDepth);
227 227
         }
228 228
 
229 229
         return $query;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         if (!empty($typeId)) {
272 272
             $query
273 273
                 ->andWhere([
274
-                    'typeId' => (int)$typeId,
274
+                    'typeId' => (int) $typeId,
275 275
                 ]);
276 276
         }
277 277
         $element = $query->one();
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
             ConfigHelper::getConfigFromFile(self::configFilePath()),
399 399
             [
400 400
                 'sourceId' => $sourceModel->id,
401
-                'sourceName' => (string)$sourceModel->name,
401
+                'sourceName' => (string) $sourceModel->name,
402 402
                 'sourceHandle' => $sourceModel->handle,
403 403
                 'sourceType' => $sourceModel->type,
404 404
             ]
Please login to merge, or discard this patch.
src/controllers/SettingsController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
         string $sourceBundleType,
509 509
         string $sourceHandle,
510 510
         string $siteHandle = null,
511
-               $typeId = null,
512
-               $loadFromSiteHandle = null,
511
+                $typeId = null,
512
+                $loadFromSiteHandle = null,
513 513
     ): Response {
514 514
         $variables = [];
515 515
         // @TODO: Let people choose an entry/categorygroup/product as the preview
@@ -1222,7 +1222,7 @@  discard block
 block discarded – undo
1222 1222
         string $sourceHandle,
1223 1223
         string $groupName,
1224 1224
         array  &$variables,
1225
-               $typeId = null,
1225
+                $typeId = null,
1226 1226
     ) {
1227 1227
         $variables['textFieldSources'] = array_merge(
1228 1228
             ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'],
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     /**
89 89
      * @inheritdoc
90 90
      */
91
-    protected array|bool|int $allowAnonymous = [
91
+    protected array | bool | int $allowAnonymous = [
92 92
     ];
93 93
 
94 94
     // Public Methods
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $variables['pluginName'] = Seomatic::$settings->pluginName;
133 133
         $variables['title'] = $templateTitle;
134 134
         $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
135
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
135
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
136 136
         $variables['crumbs'] = [
137 137
             [
138 138
                 'label' => $pluginName,
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             ],
141 141
             [
142 142
                 'label' => $templateTitle,
143
-                'url' => UrlHelper::cpUrl('seomatic/dashboard' . $siteHandleUri),
143
+                'url' => UrlHelper::cpUrl('seomatic/dashboard'.$siteHandleUri),
144 144
             ],
145 145
         ];
146 146
         $variables['selectedSubnavItem'] = 'dashboard';
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
         foreach ($variables['metaBundles'] as $metaBundle) {
164 164
             $stat = 0;
165 165
             foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) {
166
-                $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]);
166
+                $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]);
167 167
                 $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0;
168 168
                 $variables['contentSetupChecklist'][$setupField] = [
169 169
                     'label' => $setupLabel,
170
-                    'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]),
170
+                    'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]),
171 171
                 ];
172 172
             }
173 173
             $stat = round($numGrades - (($stat * $numGrades) / $numFields));
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
         }
179 179
         // Global SEO grades
180 180
         Seomatic::$previewingMetaContainers = true;
181
-        $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId);
181
+        $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId);
182 182
         Seomatic::$previewingMetaContainers = false;
183 183
         if ($metaBundle !== null) {
184 184
             $stat = 0;
185 185
             $variables['globalSetupChecklist'] = [];
186 186
             foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) {
187
-                $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]);
187
+                $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]);
188 188
                 $variables['globalSetupChecklist'][$setupField] = [
189 189
                     'label' => $setupLabel,
190
-                    'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]),
190
+                    'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]),
191 191
                 ];
192 192
             }
193 193
             $stat = round(($stat / $numFields) * 100);
@@ -197,17 +197,17 @@  discard block
 block discarded – undo
197 197
             $stat = 0;
198 198
             $variables['siteSetupChecklist'] = [];
199 199
             foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) {
200
-                $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]);
200
+                $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]);
201 201
                 $variables['siteSetupChecklist'][$setupField] = [
202 202
                     'label' => $setupLabel,
203
-                    'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]),
203
+                    'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]),
204 204
                 ];
205 205
             }
206 206
             foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) {
207
-                $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]);
207
+                $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]);
208 208
                 $variables['siteSetupChecklist'][$setupField] = [
209 209
                     'label' => $setupLabel,
210
-                    'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]),
210
+                    'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]),
211 211
                 ];
212 212
             }
213 213
             $stat = round(($stat / $numFields) * 100);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $variables['title'] = $templateTitle;
256 256
         $variables['subSectionTitle'] = $subSectionTitle;
257 257
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
258
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
258
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
259 259
         $variables['crumbs'] = [
260 260
             [
261 261
                 'label' => $pluginName,
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
             ],
264 264
             [
265 265
                 'label' => $templateTitle,
266
-                'url' => UrlHelper::cpUrl('seomatic/global/general' . $siteHandleUri),
266
+                'url' => UrlHelper::cpUrl('seomatic/global/general'.$siteHandleUri),
267 267
             ],
268 268
             [
269 269
                 'label' => $subSectionTitle,
270
-                'url' => UrlHelper::cpUrl('seomatic/global/' . $subSection . $siteHandleUri),
270
+                'url' => UrlHelper::cpUrl('seomatic/global/'.$subSection.$siteHandleUri),
271 271
             ],
272 272
         ];
273 273
         $variables['selectedSubnavItem'] = 'global';
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
         $this->setGlobalFieldSourceVariables($variables);
276 276
         // Enabled sites
277 277
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
278
-        $variables['controllerHandle'] = 'global' . '/' . $subSection;
278
+        $variables['controllerHandle'] = 'global'.'/'.$subSection;
279 279
         $variables['currentSubSection'] = $subSection;
280 280
         // Meta bundle settings
281 281
         Seomatic::$previewingMetaContainers = true;
282 282
         // Get the site to copy the settings from, if any
283 283
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
284 284
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
285
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
285
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
286 286
         // Load the metabundle
287 287
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
288 288
         if ($editedMetaBundle) {
@@ -336,11 +336,11 @@  discard block
 block discarded – undo
336 336
         // Preview the meta containers
337 337
         Seomatic::$plugin->metaContainers->previewMetaContainers(
338 338
             MetaBundles::GLOBAL_META_BUNDLE,
339
-            (int)$variables['currentSiteId']
339
+            (int) $variables['currentSiteId']
340 340
         );
341 341
 
342 342
         // Render the template
343
-        return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables);
343
+        return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables);
344 344
     }
345 345
 
346 346
     /**
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $variables['pluginName'] = Seomatic::$settings->pluginName;
473 473
         $variables['title'] = $templateTitle;
474 474
         $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
475
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
475
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
476 476
         $variables['crumbs'] = [
477 477
             [
478 478
                 'label' => $pluginName,
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
             ],
481 481
             [
482 482
                 'label' => $templateTitle,
483
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
483
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
484 484
             ],
485 485
         ];
486 486
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
         $siteHandle = $this->getCpSiteHandle($siteHandle);
522 522
         $siteId = $this->getSiteIdFromHandle($siteHandle);
523 523
         if (is_string($typeId)) {
524
-            $typeId = (int)$typeId;
524
+            $typeId = (int) $typeId;
525 525
         }
526 526
         if (empty($typeId)) {
527 527
             $typeId = null;
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
             $currentType = reset($typeMenu);
540 540
             $variables['currentType'] = $typeMenu[$typeId] ?? $currentType;
541 541
             $variables['currentTypeId'] = $typeId ?? key($typeMenu);
542
-            $typeId = (int)$variables['currentTypeId'];
542
+            $typeId = (int) $variables['currentTypeId'];
543 543
         }
544 544
         // If there's only one EntryType, don't bother displaying the menu
545 545
         if (count($typeMenu) === 1) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         // Get the site to copy the settings from, if any
572 572
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
573 573
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
574
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
574
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
575 575
         // Load the metabundle
576 576
         $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle(
577 577
             $sourceBundleType,
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
         $variables['title'] = $templateTitle;
598 598
         $variables['subSectionTitle'] = $subSectionTitle;
599 599
         $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}";
600
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
600
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
601 601
         $variables['siteHandleUri'] = $siteHandleUri;
602 602
         $variables['crumbs'] = [
603 603
             [
@@ -606,10 +606,10 @@  discard block
 block discarded – undo
606 606
             ],
607 607
             [
608 608
                 'label' => 'Content SEO',
609
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
609
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
610 610
             ],
611 611
             [
612
-                'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle,
612
+                'label' => $metaBundle->sourceName.' · '.$subSectionTitle,
613 613
                 'url' => UrlHelper::cpUrl("seomatic/edit-content/${subSection}/${sourceBundleType}/${sourceHandle}"),
614 614
             ],
615 615
         ];
@@ -639,13 +639,13 @@  discard block
 block discarded – undo
639 639
         // Preview the meta containers
640 640
         Seomatic::$plugin->metaContainers->previewMetaContainers(
641 641
             $uri,
642
-            (int)$variables['currentSiteId'],
642
+            (int) $variables['currentSiteId'],
643 643
             false,
644 644
             false
645 645
         );
646 646
 
647 647
         // Render the template
648
-        return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables);
648
+        return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables);
649 649
     }
650 650
 
651 651
     /**
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
         $bundleSettings = $request->getParam('metaBundleSettings');
667 667
         $sitemapSettings = $request->getParam('metaSitemapVars');
668 668
         if (is_string($typeId)) {
669
-            $typeId = (int)$typeId;
669
+            $typeId = (int) $typeId;
670 670
         }
671 671
         // Set the element type in the template
672 672
         $elementName = '';
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
         if ($subSection === 'social') {
739 739
             $subSectionSuffix = ' Media';
740 740
         }
741
-        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix);
741
+        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix);
742 742
         // Asset bundle
743 743
         try {
744 744
             Seomatic::$view->registerAssetBundle(SeomaticAsset::class);
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
         $variables['title'] = $templateTitle;
757 757
         $variables['subSectionTitle'] = $subSectionTitle;
758 758
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
759
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
759
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
760 760
         $variables['crumbs'] = [
761 761
             [
762 762
                 'label' => $pluginName,
@@ -764,11 +764,11 @@  discard block
 block discarded – undo
764 764
             ],
765 765
             [
766 766
                 'label' => $templateTitle,
767
-                'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri),
767
+                'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri),
768 768
             ],
769 769
             [
770 770
                 'label' => $subSectionTitle,
771
-                'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri),
771
+                'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri),
772 772
             ],
773 773
         ];
774 774
         $variables['selectedSubnavItem'] = 'site';
@@ -776,14 +776,14 @@  discard block
 block discarded – undo
776 776
 
777 777
         // Enabled sites
778 778
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
779
-        $variables['controllerHandle'] = 'site' . '/' . $subSection;
779
+        $variables['controllerHandle'] = 'site'.'/'.$subSection;
780 780
 
781 781
         // The site settings for the appropriate meta bundle
782 782
         Seomatic::$previewingMetaContainers = true;
783 783
         // Get the site to copy the settings from, if any
784 784
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
785 785
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
786
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
786
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
787 787
         // Load the metabundle
788 788
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
789 789
         Seomatic::$previewingMetaContainers = false;
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
         $variables['elementType'] = Asset::class;
802 802
 
803 803
         // Render the template
804
-        return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables);
804
+        return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables);
805 805
     }
806 806
 
807 807
     /**
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
         $siteId = $this->getSiteIdFromHandle($siteHandle);
934 934
         // Enabled sites
935 935
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
936
-        $variables['controllerHandle'] = 'tracking' . '/' . $subSection;
936
+        $variables['controllerHandle'] = 'tracking'.'/'.$subSection;
937 937
         $variables['currentSubSection'] = $subSection;
938 938
 
939 939
         // The script meta containers for the global meta bundle
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         // Get the site to copy the settings from, if any
942 942
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
943 943
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
944
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
944
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
945 945
         // Load the metabundle
946 946
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
947 947
         if ($editedMetaBundle) {
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
         $variables['title'] = $templateTitle;
982 982
         $variables['subSectionTitle'] = $subSectionTitle;
983 983
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
984
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
984
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
985 985
         $variables['crumbs'] = [
986 986
             [
987 987
                 'label' => $pluginName,
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
             ],
994 994
             [
995 995
                 'label' => $subSectionTitle,
996
-                'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri),
996
+                'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri),
997 997
             ],
998 998
         ];
999 999
         $variables['selectedSubnavItem'] = 'tracking';
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
         if ($siteHandle !== null) {
1147 1147
             $site = Craft::$app->getSites()->getSiteByHandle($siteHandle);
1148 1148
             if (!$site) {
1149
-                throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle);
1149
+                throw new NotFoundHttpException('Invalid site handle: '.$siteHandle);
1150 1150
             }
1151 1151
             $siteId = $site->id;
1152 1152
         } else {
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
                 if (!empty($variables['enabledSiteIds'])) {
1184 1184
                     $siteId = reset($variables['enabledSiteIds']);
1185 1185
                 } else {
1186
-                    $this->requirePermission('editSite:' . $siteId);
1186
+                    $this->requirePermission('editSite:'.$siteId);
1187 1187
                 }
1188 1188
             }
1189 1189
         }
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
         if ($variables['showSites']) {
1204 1204
             $variables['sitesMenuLabel'] = Craft::t(
1205 1205
                 'site',
1206
-                $sites->getSiteById((int)$variables['currentSiteId'])->name
1206
+                $sites->getSiteById((int) $variables['currentSiteId'])->name
1207 1207
             );
1208 1208
         } else {
1209 1209
             $variables['sitesMenuLabel'] = '';
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
                $typeId = null,
1271 1271
     ) {
1272 1272
         $variables['textFieldSources'] = array_merge(
1273
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'],
1273
+            ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'],
1274 1274
             FieldHelper::fieldsOfTypeFromSource(
1275 1275
                 $sourceBundleType,
1276 1276
                 $sourceHandle,
@@ -1280,7 +1280,7 @@  discard block
 block discarded – undo
1280 1280
             )
1281 1281
         );
1282 1282
         $variables['assetFieldSources'] = array_merge(
1283
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields']],
1283
+            ['entryGroup' => ['optgroup' => $groupName.' Fields']],
1284 1284
             FieldHelper::fieldsOfTypeFromSource(
1285 1285
                 $sourceBundleType,
1286 1286
                 $sourceHandle,
Please login to merge, or discard this patch.
src/console/controllers/SitemapController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * @var    bool|array
42 42
      */
43
-    protected array|bool|int $allowAnonymous = [
43
+    protected array | bool | int $allowAnonymous = [
44 44
     ];
45 45
 
46 46
     // Public Methods
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function actionGenerate()
66 66
     {
67
-        echo 'This CLI command is no longer needed because of the paginated sitemap generation' . PHP_EOL;
67
+        echo 'This CLI command is no longer needed because of the paginated sitemap generation'.PHP_EOL;
68 68
     }
69 69
 
70 70
     // Protected Methods
Please login to merge, or discard this patch.
src/helpers/UrlHelper.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
             $siteUrl = MetaValue::parseString($siteUrl);
47 47
             // Extract out just the path part
48 48
             $parts = self::decomposeUrl($path);
49
-            $path = $parts['path'] . $parts['suffix'];
49
+            $path = $parts['path'].$parts['suffix'];
50 50
             $url = self::mergeUrlWithPath($siteUrl, $path);
51 51
             // Handle trailing slashes properly for generated URLs
52 52
             $generalConfig = Craft::$app->getConfig()->getGeneral();
53 53
             if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/(.+\?.*)|(\.[^\/]+$)/', $url)) {
54
-                $url = rtrim($url, '/') . '/';
54
+                $url = rtrim($url, '/').'/';
55 55
             }
56 56
             if (!$generalConfig->addTrailingSlashesToUrls) {
57 57
                 $url = rtrim($url, '/');
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     public static function mergeUrlWithPath(string $url, string $path): string
74 74
     {
75 75
         $overlap = 0;
76
-        $url = rtrim($url, '/') . '/';
77
-        $path = '/' . ltrim($path, '/');
76
+        $url = rtrim($url, '/').'/';
77
+        $path = '/'.ltrim($path, '/');
78 78
         $urlOffset = strlen($url);
79 79
         $pathLength = strlen($path);
80 80
         $pathOffset = 0;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             }
87 87
         }
88 88
 
89
-        return rtrim($url, '/') . '/' . ltrim(substr($path, $overlap), '/');
89
+        return rtrim($url, '/').'/'.ltrim(substr($path, $overlap), '/');
90 90
     }
91 91
 
92 92
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // Handle trailing slashes properly for generated URLs
159 159
         $generalConfig = Craft::$app->getConfig()->getGeneral();
160 160
         if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/(.+\?.*)|(\.[^\/]+$)/', $url)) {
161
-            $url = rtrim($url, '/') . '/';
161
+            $url = rtrim($url, '/').'/';
162 162
         }
163 163
         if (!$generalConfig->addTrailingSlashesToUrls && (!$preserveTrailingSlash || self::urlIsSiteIndex($url))) {
164 164
             $url = rtrim($url, '/');
@@ -178,13 +178,13 @@  discard block
 block discarded – undo
178 178
         $urlParts = parse_url($url);
179 179
         $encodedUrl = "";
180 180
         if (isset($urlParts['scheme'])) {
181
-            $encodedUrl .= $urlParts['scheme'] . '://';
181
+            $encodedUrl .= $urlParts['scheme'].'://';
182 182
         }
183 183
         if (isset($urlParts['host'])) {
184 184
             $encodedUrl .= $urlParts['host'];
185 185
         }
186 186
         if (isset($urlParts['port'])) {
187
-            $encodedUrl .= ':' . $urlParts['port'];
187
+            $encodedUrl .= ':'.$urlParts['port'];
188 188
         }
189 189
         if (isset($urlParts['path'])) {
190 190
             $encodedUrl .= $urlParts['path'];
@@ -194,15 +194,15 @@  discard block
 block discarded – undo
194 194
             foreach ($query as $j => $value) {
195 195
                 $value = explode('=', $value, 2);
196 196
                 if (count($value) === 2) {
197
-                    $query[$j] = urlencode($value[0]) . '=' . urlencode($value[1]);
197
+                    $query[$j] = urlencode($value[0]).'='.urlencode($value[1]);
198 198
                 } else {
199 199
                     $query[$j] = urlencode($value[0]);
200 200
                 }
201 201
             }
202
-            $encodedUrl .= '?' . implode('&', $query);
202
+            $encodedUrl .= '?'.implode('&', $query);
203 203
         }
204 204
         if (isset($urlParts['fragment'])) {
205
-            $encodedUrl .= '#' . $urlParts['fragment'];
205
+            $encodedUrl .= '#'.$urlParts['fragment'];
206 206
         }
207 207
 
208 208
         return $encodedUrl;
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
             $sitePath = parse_url(self::siteUrl('/', null, null, $site->id), PHP_URL_PATH);
235 235
             if (!empty($sitePath)) {
236 236
                 // Normalizes a URI path by trimming leading/ trailing slashes and removing double slashes
237
-                $sitePath = '/' . preg_replace('/\/\/+/', '/', trim($sitePath, '/'));
237
+                $sitePath = '/'.preg_replace('/\/\/+/', '/', trim($sitePath, '/'));
238 238
             }
239 239
             // Normalizes a URI path by trimming leading/ trailing slashes and removing double slashes
240
-            $url = '/' . preg_replace('/\/\/+/', '/', trim($url, '/'));
240
+            $url = '/'.preg_replace('/\/\/+/', '/', trim($url, '/'));
241 241
             // See if this url ends with a site prefix, and thus is a site index
242 242
             if (str_ends_with($url, $sitePath)) {
243 243
                 $result = true;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             if ($siteId !== null) {
271 271
                 $site = $sites->getSiteById($siteId, true);
272 272
                 if (!$site) {
273
-                    throw new Exception('Invalid site ID: ' . $siteId);
273
+                    throw new Exception('Invalid site ID: '.$siteId);
274 274
                 }
275 275
             }
276 276
 
@@ -315,11 +315,11 @@  discard block
 block discarded – undo
315 315
 
316 316
         if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) {
317 317
             $url_parts = parse_url($pathOrUrl);
318
-            $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host'];
318
+            $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host'];
319 319
             $result['path'] = $url_parts['path'] ?? '';
320 320
             $result['suffix'] = '';
321
-            $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query'];
322
-            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment'];
321
+            $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query'];
322
+            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment'];
323 323
         } else {
324 324
             $result['prefix'] = '';
325 325
             $result['path'] = $pathOrUrl;
Please login to merge, or discard this patch.
src/helpers/DynamicMeta.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         if ($pageInfo !== null && $pageInfo->currentPage !== null) {
89 89
             // Let the meta containers know that this page is paginated
90
-            Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage;
90
+            Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage;
91 91
             // See if we should strip the query params
92 92
             $stripQueryParams = true;
93 93
             $pageTrigger = Craft::$app->getConfig()->getGeneral()->pageTrigger;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     if (is_array($content)) {
171 171
                         $headerValue = '';
172 172
                         foreach ($content as $contentVal) {
173
-                            $headerValue .= ($contentVal . ',');
173
+                            $headerValue .= ($contentVal.',');
174 174
                         }
175 175
                         $headerValue = rtrim($headerValue, ',');
176 176
                     } else {
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
                         $headerValue = '';
191 191
                         foreach ($href as $hrefVal) {
192 192
                             $hrefVal = UrlHelper::encodeUrl($hrefVal);
193
-                            $headerValue .= ('<' . $hrefVal . '>' . ',');
193
+                            $headerValue .= ('<'.$hrefVal.'>'.',');
194 194
                         }
195 195
                         $headerValue = rtrim($headerValue, ',');
196 196
                     } else {
197 197
                         $href = UrlHelper::encodeUrl($href);
198
-                        $headerValue = '<' . $href . '>';
198
+                        $headerValue = '<'.$href.'>';
199 199
                     }
200 200
                     $headerValue .= "; rel='canonical'";
201 201
                     $response->headers->add('Link', $headerValue);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     if (is_array($content)) {
212 212
                         $headerValue = '';
213 213
                         foreach ($content as $contentVal) {
214
-                            $headerValue .= ($contentVal . ',');
214
+                            $headerValue .= ($contentVal.',');
215 215
                         }
216 216
                         $headerValue = rtrim($headerValue, ',');
217 217
                     } else {
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
                         }
626 626
                     }
627 627
                     // Never include the URL if the element isn't enabled for the site
628
-                    if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) {
628
+                    if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) {
629 629
                         $includeUrl = false;
630 630
                     }
631 631
                 } else {
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
                 if (isset($value[$day][$time])
834 834
                     && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false
835 835
                 ) {
836
-                    $normalized[$day][$time] = (array)($date);
836
+                    $normalized[$day][$time] = (array) ($date);
837 837
                 } else {
838 838
                     $normalized[$day][$time] = null;
839 839
                 }
Please login to merge, or discard this patch.