Test Failed
Push — v5 ( faead4...ba4c33 )
by Andrew
44:12 queued 19:45
created
src/helpers/Text.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if (!empty($string)) {
72 72
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
73 73
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
74
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
74
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
75 75
         }
76 76
 
77 77
         return $result;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         if (!empty($string)) {
97 97
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
98 98
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
99
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
99
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
100 100
         }
101 101
 
102 102
         return $result;
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
             $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw()));
128 128
         } else {
129 129
             if (self::isArrayLike($field)) {
130
-                $result = self::smartStripTags((string)$field[0]);
130
+                $result = self::smartStripTags((string) $field[0]);
131 131
             } else {
132
-                $result = self::smartStripTags((string)$field);
132
+                $result = self::smartStripTags((string) $field);
133 133
             }
134 134
         }
135 135
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $tags = $tags->all();
157 157
         }
158 158
         foreach ($tags as $tag) {
159
-            $result .= $tag->title . ', ';
159
+            $result .= $tag->title.', ';
160 160
         }
161 161
         $result = rtrim($result, ', ');
162 162
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     foreach ($fieldClasses as $fieldClassKey) {
199 199
                         if ($field instanceof $fieldClassKey) {
200 200
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
201
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
201
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
202 202
                             }
203 203
                         }
204 204
                     }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                     foreach ($fieldClasses as $fieldClassKey) {
241 241
                         if ($field instanceof $fieldClassKey) {
242 242
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
243
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
243
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
244 244
                             }
245 245
                         }
246 246
                     }
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
340 340
         $str = rawurldecode($str);
341 341
         // Remove any linebreaks
342
-        $str = (string)preg_replace("/\r|\n/", "", $str);
342
+        $str = (string) preg_replace("/\r|\n/", "", $str);
343 343
         $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']);
344 344
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
345 345
         // Remove any embedded Twig code
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
             $language = 'English';
431 431
         }
432 432
 
433
-        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\' . ucfirst($language);
433
+        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\'.ucfirst($language);
434 434
         if (class_exists($className)) {
435 435
             $stopWords = new $className();
436 436
         }
Please login to merge, or discard this patch.
src/helpers/Sitemap.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         if ($multiSite) {
121 121
             $urlsetLine .= ' xmlns:xhtml="http://www.w3.org/1999/xhtml"';
122 122
         }
123
-        if ((bool)$metaBundle->metaSitemapVars->newsSitemap) {
123
+        if ((bool) $metaBundle->metaSitemapVars->newsSitemap) {
124 124
             $urlsetLine .= ' xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"';
125 125
         }
126 126
         $urlsetLine .= '>';
@@ -188,13 +188,13 @@  discard block
 block discarded – undo
188 188
                         $paginator->getTotalPages(),
189 189
                         $paginator->getTotalResults());
190 190
                 }
191
-                echo $message . PHP_EOL;
191
+                echo $message.PHP_EOL;
192 192
             }
193 193
             /** @var Element $element */
194 194
             foreach ($elements as $element) {
195 195
                 // Output some info if this is a console app
196 196
                 if (Craft::$app instanceof ConsoleApplication) {
197
-                    echo "Processing element {$currentElement}/{$totalElements} - {$element->title}" . PHP_EOL;
197
+                    echo "Processing element {$currentElement}/{$totalElements} - {$element->title}".PHP_EOL;
198 198
                 }
199 199
 
200 200
                 $metaBundle->metaSitemapVars->setAttributes($stashedSitemapAttrs, false);
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                         }
240 240
                         $canonicalUrl = UrlHelper::absoluteUrlWithProtocol($canonicalUrl);
241 241
                         if ($url !== $canonicalUrl) {
242
-                            Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - " . $metaBundle->metaGlobalVars->canonicalUrl . " - " . $element->uri);
242
+                            Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - ".$metaBundle->metaGlobalVars->canonicalUrl." - ".$element->uri);
243 243
                             continue;
244 244
                         }
245 245
                     }
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
                                             if ($primarySiteId === $altSourceSiteId && Seomatic::$settings->addXDefaultHrefLang) {
298 298
                                                 $lines[] = '<xhtml:link rel="alternate"'
299 299
                                                     . ' hreflang="x-default"'
300
-                                                    . ' href="' . Html::encode($altUrl) . '"'
300
+                                                    . ' href="'.Html::encode($altUrl).'"'
301 301
                                                     . ' />';
302 302
                                             }
303 303
                                             $lines[] = '<xhtml:link rel="alternate"'
304
-                                                . ' hreflang="' . $altSiteSettings['language'] . '"'
305
-                                                . ' href="' . Html::encode($altUrl) . '"'
304
+                                                . ' hreflang="'.$altSiteSettings['language'].'"'
305
+                                                . ' href="'.Html::encode($altUrl).'"'
306 306
                                                 . ' />';
307 307
                                         }
308 308
                                     }
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                         }
312 312
                     }
313 313
                     // Handle news sitemaps https://developers.google.com/search/docs/crawling-indexing/sitemaps/news-sitemap
314
-                    if ((bool)$metaBundle->metaSitemapVars->newsSitemap) {
314
+                    if ((bool) $metaBundle->metaSitemapVars->newsSitemap) {
315 315
                         $now = new DateTime();
316 316
                         $interval = $now->diff($dateUpdated);
317 317
                         if ($interval->days <= 2) {
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
                             }
322 322
                             $lines[] = '<news:news>';
323 323
                             $lines[] = '<news:publication>';
324
-                            $lines[] = '<news:name>' . $metaBundle->metaSitemapVars->newsPublicationName . '</news:name>';
325
-                            $lines[] = '<news:language>' . $language . '</news:language>';
324
+                            $lines[] = '<news:name>'.$metaBundle->metaSitemapVars->newsPublicationName.'</news:name>';
325
+                            $lines[] = '<news:language>'.$language.'</news:language>';
326 326
                             $lines[] = '</news:publication>';
327
-                            $lines[] = '<news:publication_date>' . $dateUpdated->format(DateTime::W3C) . '</news:publication_date>';
328
-                            $lines[] = '<news:title>' . $element->title . '</news:title>';
327
+                            $lines[] = '<news:publication_date>'.$dateUpdated->format(DateTime::W3C).'</news:publication_date>';
328
+                            $lines[] = '<news:title>'.$element->title.'</news:title>';
329 329
                             $lines[] = '</news:news>';
330 330
                         }
331 331
                     }
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 
510 510
                         $attributes = array_intersect_key(
511 511
                             $attributes,
512
-                            array_flip((array)$seoSettingsField->sitemapEnabledFields)
512
+                            array_flip((array) $seoSettingsField->sitemapEnabledFields)
513 513
                         );
514 514
                         $attributes = array_filter(
515 515
                             $attributes,
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
      */
542 542
     protected static function assetSitemapItem(Asset $asset, MetaBundle $metaBundle, array &$lines)
543 543
     {
544
-        if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) {
544
+        if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) {
545 545
             switch ($asset->kind) {
546 546
                 case 'image':
547 547
                     $transform = Craft::$app->getImageTransforms()->getTransformByHandle($metaBundle->metaSitemapVars->sitemapAssetTransform ?? '');
@@ -554,9 +554,9 @@  discard block
 block discarded – undo
554 554
                         $fieldName = $row['field'] ?? '';
555 555
                         $propName = $row['property'] ?? '';
556 556
                         if (!empty($fieldName) && !empty($asset[$fieldName]) && !empty($propName)) {
557
-                            $lines[] = '<image:' . $propName . '>';
557
+                            $lines[] = '<image:'.$propName.'>';
558 558
                             $lines[] = Html::encode($asset[$fieldName]);
559
-                            $lines[] = '</image:' . $propName . '>';
559
+                            $lines[] = '</image:'.$propName.'>';
560 560
                         }
561 561
                     }
562 562
                     $lines[] = '</image:image>';
@@ -572,9 +572,9 @@  discard block
 block discarded – undo
572 572
                         $fieldName = $row['field'] ?? '';
573 573
                         $propName = $row['property'] ?? '';
574 574
                         if (!empty($fieldName) && !empty($asset[$fieldName]) && !empty($propName)) {
575
-                            $lines[] = '<video:' . $propName . '>';
575
+                            $lines[] = '<video:'.$propName.'>';
576 576
                             $lines[] = Html::encode($asset[$fieldName]);
577
-                            $lines[] = '</video:' . $propName . '>';
577
+                            $lines[] = '</video:'.$propName.'>';
578 578
                         }
579 579
                     }
580 580
                     $lines[] = '</video:video>';
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      */
591 591
     protected static function assetFilesSitemapLink(Asset $asset, MetaBundle $metaBundle, array &$lines)
592 592
     {
593
-        if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) {
593
+        if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) {
594 594
             if (in_array($asset->kind, SitemapTemplate::FILE_TYPES, false)) {
595 595
                 $dateUpdated = $asset->dateUpdated ?? $asset->dateCreated ?? new DateTime();
596 596
                 $lines[] = '<url>';
Please login to merge, or discard this patch.
src/fields/SeoSettings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * @inheritdoc
113 113
      */
114
-    public static function dbType(): array|string|null
114
+    public static function dbType(): array | string | null
115 115
     {
116 116
         return Schema::TYPE_TEXT;
117 117
     }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             }
240 240
             // Handle the mainEntityOfPage
241 241
             $mainEntity = '';
242
-            if (in_array('mainEntityOfPage', (array)$this->generalEnabledFields, false) &&
242
+            if (in_array('mainEntityOfPage', (array) $this->generalEnabledFields, false) &&
243 243
                 !empty($config['metaBundleSettings'])) {
244 244
                 $mainEntity = SchemaHelper::getSpecificEntityType($config['metaBundleSettings'], true);
245 245
             }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         if ($element !== null && $element->uri !== null) {
394 394
             $siteId = $element->siteId;
395 395
             $uri = $element->uri;
396
-            $cacheKey = self::CACHE_KEY . $uri . $siteId . $this->elementDisplayPreviewType;
396
+            $cacheKey = self::CACHE_KEY.$uri.$siteId.$this->elementDisplayPreviewType;
397 397
             $metaBundleSourceType = Seomatic::$plugin->seoElements->getMetaBundleTypeFromElement($element);
398 398
             $seoElement = Seomatic::$plugin->seoElements->getSeoElementByMetaBundleType($metaBundleSourceType);
399 399
             $metaBundleSourceType = SeoEntry::getMetaBundleType();
@@ -404,14 +404,14 @@  discard block
 block discarded – undo
404 404
             $dependency = new TagDependency([
405 405
                 'tags' => [
406 406
                     MetaContainers::GLOBAL_METACONTAINER_CACHE_TAG,
407
-                    MetaContainers::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId,
408
-                    MetaContainers::METACONTAINER_CACHE_TAG . $uri . $siteId,
407
+                    MetaContainers::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId,
408
+                    MetaContainers::METACONTAINER_CACHE_TAG.$uri.$siteId,
409 409
                 ],
410 410
             ]);
411 411
             $cache = Craft::$app->getCache();
412 412
             $cacheDuration = null;
413 413
             $html = $cache->getOrSet(
414
-                self::CACHE_KEY . $cacheKey,
414
+                self::CACHE_KEY.$cacheKey,
415 415
                 function() use ($uri, $siteId, $element) {
416 416
                     Seomatic::$plugin->metaContainers->previewMetaContainers($uri, $siteId, true, true, $element);
417 417
                     $variables = [
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         array   &$variables,
454 454
     ) {
455 455
         $variables['textFieldSources'] = array_merge(
456
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'],
456
+            ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'],
457 457
             FieldHelper::fieldsOfTypeFromElement(
458 458
                 $element,
459 459
                 FieldHelper::TEXT_FIELD_CLASS_KEY,
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
             )
462 462
         );
463 463
         $variables['assetFieldSources'] = array_merge(
464
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields']],
464
+            ['entryGroup' => ['optgroup' => $groupName.' Fields']],
465 465
             FieldHelper::fieldsOfTypeFromElement(
466 466
                 $element,
467 467
                 FieldHelper::ASSET_FIELD_CLASS_KEY,
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/services/MetaContainers.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         // Get the page number of this request
183 183
         $request = Craft::$app->getRequest();
184 184
         if (!$request->isConsoleRequest) {
185
-            $this->paginationPage = (string)$request->pageNum;
185
+            $this->paginationPage = (string) $request->pageNum;
186 186
         }
187 187
     }
188 188
 
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
         $dependency = $this->containerDependency;
252 252
         $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY;
253 253
         list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet(
254
-            self::GLOBALS_CACHE_KEY . $uniqueKey,
254
+            self::GLOBALS_CACHE_KEY.$uniqueKey,
255 255
             function() use ($uniqueKey) {
256 256
                 Craft::info(
257
-                    self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey,
257
+                    self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey,
258 258
                     __METHOD__
259 259
                 );
260 260
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                     ?? 1;
381 381
             }
382 382
             // Handle pagination
383
-            $paginationPage = 'page' . $this->paginationPage;
383
+            $paginationPage = 'page'.$this->paginationPage;
384 384
             // Get the path for the current request
385 385
             $request = Craft::$app->getRequest();
386 386
             $requestPath = '/';
@@ -405,21 +405,21 @@  discard block
 block discarded – undo
405 405
                 }
406 406
             }
407 407
             // Get our cache key
408
-            $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams() . $token;
408
+            $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams().$token;
409 409
             // For requests with a status code of >= 400, use one cache key
410 410
             if (!$request->isConsoleRequest) {
411 411
                 $response = Craft::$app->getResponse();
412 412
                 if ($response->statusCode >= 400) {
413
-                    $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode;
413
+                    $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode;
414 414
                 }
415 415
             }
416 416
             // Load the meta containers
417 417
             $dependency = new TagDependency([
418 418
                 'tags' => [
419 419
                     self::GLOBAL_METACONTAINER_CACHE_TAG,
420
-                    self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId,
421
-                    self::METACONTAINER_CACHE_TAG . $uri . $siteId,
422
-                    self::METACONTAINER_CACHE_TAG . $cacheKey,
420
+                    self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId,
421
+                    self::METACONTAINER_CACHE_TAG.$uri.$siteId,
422
+                    self::METACONTAINER_CACHE_TAG.$cacheKey,
423 423
                 ],
424 424
             ]);
425 425
             $this->containerDependency = $dependency;
@@ -436,10 +436,10 @@  discard block
 block discarded – undo
436 436
             } else {
437 437
                 $cache = Craft::$app->getCache();
438 438
                 list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet(
439
-                    self::CACHE_KEY . $cacheKey,
439
+                    self::CACHE_KEY.$cacheKey,
440 440
                     function() use ($uri, $siteId) {
441 441
                         Craft::info(
442
-                            'Meta container cache miss: ' . $uri . '/' . $siteId,
442
+                            'Meta container cache miss: '.$uri.'/'.$siteId,
443 443
                             __METHOD__
444 444
                         );
445 445
                         $this->loadGlobalMetaContainers($siteId);
@@ -843,10 +843,10 @@  discard block
 block discarded – undo
843 843
         $cache = Craft::$app->getCache();
844 844
         TagDependency::invalidate(
845 845
             $cache,
846
-            self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId
846
+            self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId
847 847
         );
848 848
         Craft::info(
849
-            'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId,
849
+            'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId,
850 850
             __METHOD__
851 851
         );
852 852
         // Trigger an event to let other plugins/modules know we've cleared our caches
@@ -873,9 +873,9 @@  discard block
 block discarded – undo
873 873
         if ($siteId === null) {
874 874
             $siteId = Craft::$app->getSites()->currentSite->id ?? 1;
875 875
         }
876
-        TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId);
876
+        TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId);
877 877
         Craft::info(
878
-            'Meta container cache cleared: ' . $uri . ' / ' . $siteId,
878
+            'Meta container cache cleared: '.$uri.' / '.$siteId,
879 879
             __METHOD__
880 880
         );
881 881
         // Trigger an event to let other plugins/modules know we've cleared our caches
@@ -1018,7 +1018,7 @@  discard block
 block discarded – undo
1018 1018
 
1019 1019
                     // Handle re-creating the `mainEntityOfPage` so that the model injected into the
1020 1020
                     // templates has the appropriate attributes
1021
-                    $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE;
1021
+                    $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE;
1022 1022
                     $generalContainer = $this->metaContainers[$generalContainerKey];
1023 1023
                     if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) {
1024 1024
                         /** @var MetaJsonLd $jsonLdModel */
Please login to merge, or discard this patch.
src/helpers/Container.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,24 +90,24 @@
 block discarded – undo
90 90
         }
91 91
         // Get our cache key
92 92
         $asArrayKey = $asArray ? 'true' : 'false';
93
-        $cacheKey = $uri . $siteId . implode($containerKeys) . $asArrayKey . Seomatic::$environment . $token;
93
+        $cacheKey = $uri.$siteId.implode($containerKeys).$asArrayKey.Seomatic::$environment.$token;
94 94
         // Load the meta containers
95 95
         $dependency = new TagDependency([
96 96
             'tags' => [
97 97
                 $metaContainers::GLOBAL_METACONTAINER_CACHE_TAG,
98
-                $metaContainers::METACONTAINER_CACHE_TAG . $sourceId . $sourceBundleType . $siteId,
99
-                $metaContainers::METACONTAINER_CACHE_TAG . $uri . $siteId,
100
-                $metaContainers::METACONTAINER_CACHE_TAG . $cacheKey,
98
+                $metaContainers::METACONTAINER_CACHE_TAG.$sourceId.$sourceBundleType.$siteId,
99
+                $metaContainers::METACONTAINER_CACHE_TAG.$uri.$siteId,
100
+                $metaContainers::METACONTAINER_CACHE_TAG.$cacheKey,
101 101
             ],
102 102
         ]);
103 103
 
104 104
         $cache = Craft::$app->getCache();
105 105
         $result = $cache->getOrSet(
106
-            self::CACHE_KEY . $cacheKey,
106
+            self::CACHE_KEY.$cacheKey,
107 107
             function() use ($uri, $siteId, $containerKeys, $asArray) {
108 108
                 $result = [];
109 109
                 Craft::info(
110
-                    'Meta controller container cache miss: ' . $uri . '/' . $siteId,
110
+                    'Meta controller container cache miss: '.$uri.'/'.$siteId,
111 111
                     __METHOD__
112 112
                 );
113 113
                 // Load the meta containers and parse our globals
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   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * @inheritdoc
91 91
      */
92
-    protected array|bool|int $allowAnonymous = [
92
+    protected array | bool | int $allowAnonymous = [
93 93
     ];
94 94
 
95 95
     // 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,13 +336,13 @@  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
         $this->setCrumbVariables($variables);
343 343
 
344 344
         // Render the template
345
-        return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables);
345
+        return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables);
346 346
     }
347 347
 
348 348
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         $variables['pluginName'] = Seomatic::$settings->pluginName;
474 474
         $variables['title'] = $templateTitle;
475 475
         $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
476
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
476
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
477 477
         $variables['crumbs'] = [
478 478
             [
479 479
                 'label' => $pluginName,
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
             ],
482 482
             [
483 483
                 'label' => $templateTitle,
484
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
484
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
485 485
             ],
486 486
         ];
487 487
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
         // Get the site to edit
523 523
         $siteId = $this->getSiteIdFromHandle($siteHandle);
524 524
         if (is_string($typeId)) {
525
-            $typeId = (int)$typeId;
525
+            $typeId = (int) $typeId;
526 526
         }
527 527
         // Get the (entry) type menu
528 528
         $typeMenu = [];
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             $currentType = reset($typeMenu);
537 537
             $variables['currentType'] = $typeMenu[$typeId] ?? $currentType;
538 538
             $variables['currentTypeId'] = $typeId ?? key($typeMenu);
539
-            $typeId = (int)$variables['currentTypeId'];
539
+            $typeId = (int) $variables['currentTypeId'];
540 540
         }
541 541
         $pluginName = Seomatic::$settings->pluginName;
542 542
         // Asset bundle
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         // Get the site to copy the settings from, if any
558 558
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
559 559
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
560
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
560
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
561 561
         // Load the metabundle
562 562
         $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle(
563 563
             $sourceBundleType,
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
         $variables['title'] = $templateTitle;
584 584
         $variables['subSectionTitle'] = $subSectionTitle;
585 585
         $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}";
586
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
586
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
587 587
         $variables['siteHandleUri'] = $siteHandleUri;
588 588
         $variables['crumbs'] = [
589 589
             [
@@ -592,10 +592,10 @@  discard block
 block discarded – undo
592 592
             ],
593 593
             [
594 594
                 'label' => 'Content SEO',
595
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
595
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
596 596
             ],
597 597
             [
598
-                'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle,
598
+                'label' => $metaBundle->sourceName.' · '.$subSectionTitle,
599 599
                 'url' => UrlHelper::cpUrl("seomatic/edit-content/{$subSection}/{$sourceBundleType}/{$sourceHandle}"),
600 600
             ],
601 601
         ];
@@ -626,13 +626,13 @@  discard block
 block discarded – undo
626 626
         // Preview the meta containers
627 627
         Seomatic::$plugin->metaContainers->previewMetaContainers(
628 628
             $uri,
629
-            (int)$variables['currentSiteId'],
629
+            (int) $variables['currentSiteId'],
630 630
             false,
631 631
             false
632 632
         );
633 633
 
634 634
         // Render the template
635
-        return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables);
635
+        return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables);
636 636
     }
637 637
 
638 638
     /**
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
         $bundleSettings = $request->getParam('metaBundleSettings');
653 653
         $sitemapSettings = $request->getParam('metaSitemapVars');
654 654
         if (is_string($typeId)) {
655
-            $typeId = (int)$typeId;
655
+            $typeId = (int) $typeId;
656 656
         }
657 657
         // Set the element type in the template
658 658
         $elementName = '';
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
         if ($subSection === 'social') {
718 718
             $subSectionSuffix = ' Media';
719 719
         }
720
-        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix);
720
+        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix);
721 721
         // Asset bundle
722 722
         try {
723 723
             Seomatic::$view->registerAssetBundle(SeomaticAsset::class);
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         $variables['title'] = $templateTitle;
736 736
         $variables['subSectionTitle'] = $subSectionTitle;
737 737
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
738
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
738
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
739 739
         $variables['crumbs'] = [
740 740
             [
741 741
                 'label' => $pluginName,
@@ -743,11 +743,11 @@  discard block
 block discarded – undo
743 743
             ],
744 744
             [
745 745
                 'label' => $templateTitle,
746
-                'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri),
746
+                'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri),
747 747
             ],
748 748
             [
749 749
                 'label' => $subSectionTitle,
750
-                'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri),
750
+                'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri),
751 751
             ],
752 752
         ];
753 753
         $variables['selectedSubnavItem'] = 'site';
@@ -755,14 +755,14 @@  discard block
 block discarded – undo
755 755
 
756 756
         // Enabled sites
757 757
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
758
-        $variables['controllerHandle'] = 'site' . '/' . $subSection;
758
+        $variables['controllerHandle'] = 'site'.'/'.$subSection;
759 759
 
760 760
         // The site settings for the appropriate meta bundle
761 761
         Seomatic::$previewingMetaContainers = true;
762 762
         // Get the site to copy the settings from, if any
763 763
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
764 764
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
765
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
765
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
766 766
         // Load the metabundle
767 767
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
768 768
         Seomatic::$previewingMetaContainers = false;
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
         $this->setCrumbVariables($variables);
782 782
 
783 783
         // Render the template
784
-        return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables);
784
+        return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables);
785 785
     }
786 786
 
787 787
     /**
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
         $siteId = $this->getSiteIdFromHandle($siteHandle);
913 913
         // Enabled sites
914 914
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
915
-        $variables['controllerHandle'] = 'tracking' . '/' . $subSection;
915
+        $variables['controllerHandle'] = 'tracking'.'/'.$subSection;
916 916
         $variables['currentSubSection'] = $subSection;
917 917
 
918 918
         // The script meta containers for the global meta bundle
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
         // Get the site to copy the settings from, if any
921 921
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
922 922
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
923
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
923
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
924 924
         // Load the metabundle
925 925
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
926 926
         if ($editedMetaBundle) {
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
         $variables['title'] = $templateTitle;
961 961
         $variables['subSectionTitle'] = $subSectionTitle;
962 962
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
963
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
963
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
964 964
         $variables['crumbs'] = [
965 965
             [
966 966
                 'label' => $pluginName,
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
             ],
973 973
             [
974 974
                 'label' => $subSectionTitle,
975
-                'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri),
975
+                'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri),
976 976
             ],
977 977
         ];
978 978
         $variables['selectedSubnavItem'] = 'tracking';
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
         if ($siteHandle !== null) {
1111 1111
             $site = Craft::$app->getSites()->getSiteByHandle($siteHandle);
1112 1112
             if (!$site) {
1113
-                throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle);
1113
+                throw new NotFoundHttpException('Invalid site handle: '.$siteHandle);
1114 1114
             }
1115 1115
             $siteId = $site->id;
1116 1116
         } else {
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
                 if (!empty($variables['enabledSiteIds'])) {
1148 1148
                     $siteId = reset($variables['enabledSiteIds']);
1149 1149
                 } else {
1150
-                    $this->requirePermission('editSite:' . $siteId);
1150
+                    $this->requirePermission('editSite:'.$siteId);
1151 1151
                 }
1152 1152
             }
1153 1153
         }
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
                         'icon' => 'world',
1220 1220
                         'label' => Craft::t(
1221 1221
                             'site',
1222
-                            $sites->getSiteById((int)$variables['currentSiteId'])->name
1222
+                            $sites->getSiteById((int) $variables['currentSiteId'])->name
1223 1223
                         ),
1224 1224
                         'menu' => [
1225 1225
                             'items' => $siteCrumbItems,
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
                         'icon' => 'world',
1236 1236
                         'label' => Craft::t(
1237 1237
                             'site',
1238
-                            $sites->getSiteById((int)$variables['currentSiteId'])->name
1238
+                            $sites->getSiteById((int) $variables['currentSiteId'])->name
1239 1239
                         ),
1240 1240
                         'menu' => [
1241 1241
                             'items' => $siteCrumbItems,
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
             }
1247 1247
             $variables['sitesMenuLabel'] = Craft::t(
1248 1248
                 'site',
1249
-                $sites->getSiteById((int)$variables['currentSiteId'])->name
1249
+                $sites->getSiteById((int) $variables['currentSiteId'])->name
1250 1250
             );
1251 1251
         } else {
1252 1252
             $variables['sitesMenuLabel'] = '';
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
                $typeId = null,
1327 1327
     ) {
1328 1328
         $variables['textFieldSources'] = array_merge(
1329
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'],
1329
+            ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'],
1330 1330
             FieldHelper::fieldsOfTypeFromSource(
1331 1331
                 $sourceBundleType,
1332 1332
                 $sourceHandle,
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
             )
1337 1337
         );
1338 1338
         $variables['assetFieldSources'] = array_merge(
1339
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields']],
1339
+            ['entryGroup' => ['optgroup' => $groupName.' Fields']],
1340 1340
             FieldHelper::fieldsOfTypeFromSource(
1341 1341
                 $sourceBundleType,
1342 1342
                 $sourceHandle,
Please login to merge, or discard this patch.