Passed
Push — develop ( 8952de...763d5f )
by Andrew
18:01
created
src/helpers/UrlHelper.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
             $siteUrl = MetaValue::parseString($siteUrl);
41 41
             // Extract out just the path part
42 42
             $parts = self::decomposeUrl($path);
43
-            $path = $parts['path'] . $parts['suffix'];
44
-            $url = rtrim($siteUrl, '/') . '/' . ltrim($path, '/');
43
+            $path = $parts['path'].$parts['suffix'];
44
+            $url = rtrim($siteUrl, '/').'/'.ltrim($path, '/');
45 45
             // Handle trailing slashes properly for generated URLs
46 46
             $generalConfig = Craft::$app->getConfig()->getGeneral();
47 47
             if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) {
48
-                $url = rtrim($url, '/') . '/';
48
+                $url = rtrim($url, '/').'/';
49 49
             }
50 50
             if (!$generalConfig->addTrailingSlashesToUrls) {
51 51
                 $url = rtrim($url, '/');
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         // Handle trailing slashes properly for generated URLs
123 123
         $generalConfig = Craft::$app->getConfig()->getGeneral();
124 124
         if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) {
125
-            $url = rtrim($url, '/') . '/';
125
+            $url = rtrim($url, '/').'/';
126 126
         }
127 127
         if (!$generalConfig->addTrailingSlashesToUrls) {
128 128
             $url = rtrim($url, '/');
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
         $urlParts = parse_url($url);
143 143
         $encodedUrl = "";
144 144
         if (isset($urlParts['scheme'])) {
145
-            $encodedUrl .= $urlParts['scheme'] . '://';
145
+            $encodedUrl .= $urlParts['scheme'].'://';
146 146
         }
147 147
         if (isset($urlParts['host'])) {
148 148
             $encodedUrl .= $urlParts['host'];
149 149
         }
150 150
         if (isset($urlParts['port'])) {
151
-            $encodedUrl .= ':' . $urlParts['port'];
151
+            $encodedUrl .= ':'.$urlParts['port'];
152 152
         }
153 153
         if (isset($urlParts['path'])) {
154 154
             $encodedUrl .= $urlParts['path'];
@@ -158,15 +158,15 @@  discard block
 block discarded – undo
158 158
             foreach ($query as $j => $value) {
159 159
                 $value = explode('=', $value, 2);
160 160
                 if (count($value) === 2) {
161
-                    $query[$j] = urlencode($value[0]) . '=' . urlencode($value[1]);
161
+                    $query[$j] = urlencode($value[0]).'='.urlencode($value[1]);
162 162
                 } else {
163 163
                     $query[$j] = urlencode($value[0]);
164 164
                 }
165 165
             }
166
-            $encodedUrl .= '?' . implode('&', $query);
166
+            $encodedUrl .= '?'.implode('&', $query);
167 167
         }
168 168
         if (isset($urlParts['fragment'])) {
169
-            $encodedUrl .= '#' . $urlParts['fragment'];
169
+            $encodedUrl .= '#'.$urlParts['fragment'];
170 170
         }
171 171
 
172 172
         return $encodedUrl;
@@ -199,11 +199,11 @@  discard block
 block discarded – undo
199 199
 
200 200
         if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) {
201 201
             $url_parts = parse_url($pathOrUrl);
202
-            $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host'];
202
+            $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host'];
203 203
             $result['path'] = $url_parts['path'] ?? '';
204 204
             $result['suffix'] = '';
205
-            $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query'];
206
-            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment'];
205
+            $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query'];
206
+            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment'];
207 207
         } else {
208 208
             $result['prefix'] = '';
209 209
             $result['path'] = $pathOrUrl;
Please login to merge, or discard this patch.
src/helpers/Sitemap.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         // Output some info if this is a console app
81 81
         if ($job && Craft::$app instanceof ConsoleApplication) {
82
-            echo $job->description . PHP_EOL;
82
+            echo $job->description.PHP_EOL;
83 83
         }
84 84
 
85 85
         $lines = [];
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
             while ($currentElement < $totalElements) {
140 140
                 $elements = $paginator->getPageResults();
141 141
                 if (Craft::$app instanceof ConsoleApplication) {
142
-                    echo 'Query ' . $paginator->getCurrentPage() . '/' . $paginator->getTotalPages()
143
-                        . ' - elements: ' . $paginator->getTotalResults()
142
+                    echo 'Query '.$paginator->getCurrentPage().'/'.$paginator->getTotalPages()
143
+                        . ' - elements: '.$paginator->getTotalResults()
144 144
                         . PHP_EOL;
145 145
                 }
146 146
                 /** @var ElementInterface $element */
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                     }
153 153
                     // Output some info if this is a console app
154 154
                     if (Craft::$app instanceof ConsoleApplication) {
155
-                        echo "Processing element {$currentElement}/{$totalElements} - {$element->title}" . PHP_EOL;
155
+                        echo "Processing element {$currentElement}/{$totalElements} - {$element->title}".PHP_EOL;
156 156
                     }
157 157
 
158 158
                     $metaBundle->metaSitemapVars->setAttributes($stashedSitemapAttrs, false);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             }
190 190
                             $canonicalUrl = UrlHelper::absoluteUrlWithProtocol($canonicalUrl);
191 191
                             if ($url !== $canonicalUrl) {
192
-                                Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - " . $metaBundle->metaGlobalVars->canonicalUrl . " - " . $element->uri);
192
+                                Craft::info("Excluding URL: {$url} from the sitemap because it does not match the Canonical URL: {$canonicalUrl} - ".$metaBundle->metaGlobalVars->canonicalUrl." - ".$element->uri);
193 193
                                 continue;
194 194
                             }
195 195
                         }
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
                                                 if ($primarySiteId === $altSourceSiteId && Seomatic::$settings->addXDefaultHrefLang) {
247 247
                                                     $lines[] = '<xhtml:link rel="alternate"'
248 248
                                                         . ' hreflang="x-default"'
249
-                                                        . ' href="' . Html::encode($altUrl) . '"'
249
+                                                        . ' href="'.Html::encode($altUrl).'"'
250 250
                                                         . ' />';
251 251
                                                 }
252 252
                                                 $lines[] = '<xhtml:link rel="alternate"'
253
-                                                    . ' hreflang="' . $altSiteSettings['language'] . '"'
254
-                                                    . ' href="' . Html::encode($altUrl) . '"'
253
+                                                    . ' hreflang="'.$altSiteSettings['language'].'"'
254
+                                                    . ' href="'.Html::encode($altUrl).'"'
255 255
                                                     . ' />';
256 256
                                             }
257 257
                                         }
@@ -351,11 +351,11 @@  discard block
 block discarded – undo
351 351
         }
352 352
 
353 353
         $cache = Craft::$app->getCache();
354
-        $cacheKey = SitemapTemplate::CACHE_KEY . $groupId . $type . $handle . $siteId;
354
+        $cacheKey = SitemapTemplate::CACHE_KEY.$groupId.$type.$handle.$siteId;
355 355
         $dependency = new TagDependency([
356 356
             'tags' => [
357 357
                 SitemapTemplate::GLOBAL_SITEMAP_CACHE_TAG,
358
-                SitemapTemplate::SITEMAP_CACHE_TAG . $handle . $siteId,
358
+                SitemapTemplate::SITEMAP_CACHE_TAG.$handle.$siteId,
359 359
             ],
360 360
         ]);
361 361
         $lines = implode('', $lines);
@@ -368,10 +368,10 @@  discard block
 block discarded – undo
368 368
         $result = $cache->set($cacheKey, $lines, $cacheDuration, $dependency);
369 369
         // Remove the queue job id from the cache too
370 370
         $cache->delete($queueJobCacheKey);
371
-        Craft::debug('Sitemap cache result: ' . print_r($result, true) . ' for cache key: ' . $cacheKey, __METHOD__);
371
+        Craft::debug('Sitemap cache result: '.print_r($result, true).' for cache key: '.$cacheKey, __METHOD__);
372 372
         // Output some info if this is a console app
373 373
         if (Craft::$app instanceof ConsoleApplication) {
374
-            echo 'Sitemap cache result: ' . print_r($result, true) . ' for cache key: ' . $cacheKey . PHP_EOL;
374
+            echo 'Sitemap cache result: '.print_r($result, true).' for cache key: '.$cacheKey.PHP_EOL;
375 375
         }
376 376
         // If the FastCGI Cache Bust plugin is installed, clear its caches too
377 377
         $plugin = Craft::$app->getPlugins()->getPlugin('fastcgi-cache-bust');
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
      */
485 485
     protected static function assetSitemapItem(Asset $asset, MetaBundle $metaBundle, array &$lines)
486 486
     {
487
-        if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) {
487
+        if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) {
488 488
             switch ($asset->kind) {
489 489
                 case 'image':
490 490
                     $lines[] = '<image:image>';
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
                         $fieldName = $row['field'] ?? '';
497 497
                         $propName = $row['property'] ?? '';
498 498
                         if (!empty($asset[$fieldName]) && !empty($propName)) {
499
-                            $lines[] = '<image:' . $propName . '>';
499
+                            $lines[] = '<image:'.$propName.'>';
500 500
                             $lines[] = Html::encode($asset[$fieldName]);
501
-                            $lines[] = '</image:' . $propName . '>';
501
+                            $lines[] = '</image:'.$propName.'>';
502 502
                         }
503 503
                     }
504 504
                     $lines[] = '</image:image>';
@@ -514,9 +514,9 @@  discard block
 block discarded – undo
514 514
                         $fieldName = $row['field'] ?? '';
515 515
                         $propName = $row['property'] ?? '';
516 516
                         if (!empty($asset[$fieldName]) && !empty($propName)) {
517
-                            $lines[] = '<video:' . $propName . '>';
517
+                            $lines[] = '<video:'.$propName.'>';
518 518
                             $lines[] = Html::encode($asset[$fieldName]);
519
-                            $lines[] = '</video:' . $propName . '>';
519
+                            $lines[] = '</video:'.$propName.'>';
520 520
                         }
521 521
                     }
522 522
                     $lines[] = '</video:video>';
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
      */
533 533
     protected static function assetFilesSitemapLink(Asset $asset, MetaBundle $metaBundle, array &$lines)
534 534
     {
535
-        if ((bool)$asset->enabledForSite && $asset->getUrl() !== null) {
535
+        if ((bool) $asset->enabledForSite && $asset->getUrl() !== null) {
536 536
             if (\in_array($asset->kind, SitemapTemplate::FILE_TYPES, false)) {
537 537
                 $dateUpdated = $asset->dateUpdated ?? $asset->dateCreated ?? new \DateTime;
538 538
                 $lines[] = '<url>';
Please login to merge, or discard this patch.
src/seomatic-config/globalmeta/ScriptContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 return [
23
-    MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [
23
+    MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [
24 24
         'name' => 'General',
25 25
         'description' => 'Script Tags',
26 26
         'handle' => ScriptService::GENERAL_HANDLE,
27
-        'class' => (string)MetaScriptContainer::class,
27
+        'class' => (string) MetaScriptContainer::class,
28 28
         'include' => true,
29 29
         'dependencies' => [
30 30
         ],
Please login to merge, or discard this patch.
src/migrations/m230601_184311_announcement_google_ua_deprecated.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
                         $enabled = $metaContainer['data']['googleAnalytics']['include'] ?? null;
34 34
                         if ($enabled) {
35 35
                             Craft::$app->announcements->push(
36
-                                function ($language) {
36
+                                function($language) {
37 37
                                     return Craft::t('seomatic', 'Google Universal Analytics deprecated', [], $language);
38 38
                                 },
39
-                                function ($language) {
39
+                                function($language) {
40 40
                                     return Craft::t('seomatic', 'Universal Analytics (which is used on this site via the SEOmatic plugin) is being [discontinued on July 1st, 2023]({url}). You should use Google gtag.js or Google Tag Manager instead and transition to a new GA4 property.', [
41 41
                                         'url' => 'https://support.google.com/analytics/answer/11583528',
42 42
                                     ], $language);
Please login to merge, or discard this patch.
src/models/MetaScriptContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@
 block discarded – undo
54 54
     public function includeMetaData($dependency)
55 55
     {
56 56
         Craft::beginProfile('MetaScriptContainer::includeMetaData', __METHOD__);
57
-        $uniqueKey = $this->handle . $dependency->tags[3] . $this->dataLayerHash();
57
+        $uniqueKey = $this->handle.$dependency->tags[3].$this->dataLayerHash();
58 58
         $cache = Craft::$app->getCache();
59 59
         if ($this->clearCache) {
60 60
             TagDependency::invalidate($cache, $dependency->tags[3]);
61 61
         }
62 62
         $tagData = $cache->getOrSet(
63
-            self::CONTAINER_TYPE . $uniqueKey,
64
-            function () use ($uniqueKey) {
63
+            self::CONTAINER_TYPE.$uniqueKey,
64
+            function() use ($uniqueKey) {
65 65
                 Craft::info(
66
-                    self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey,
66
+                    self::CONTAINER_TYPE.' cache miss: '.$uniqueKey,
67 67
                     __METHOD__
68 68
                 );
69 69
                 $tagData = [];
Please login to merge, or discard this patch.
src/services/MetaContainers.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         // Get the page number of this request
161 161
         $request = Craft::$app->getRequest();
162 162
         if (!$request->isConsoleRequest) {
163
-            $this->paginationPage = (string)$request->pageNum;
163
+            $this->paginationPage = (string) $request->pageNum;
164 164
         }
165 165
     }
166 166
 
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
         $dependency = $this->containerDependency;
223 223
         $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY;
224 224
         list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet(
225
-            self::GLOBALS_CACHE_KEY . $uniqueKey,
226
-            function () use ($uniqueKey) {
225
+            self::GLOBALS_CACHE_KEY.$uniqueKey,
226
+            function() use ($uniqueKey) {
227 227
                 Craft::info(
228
-                    self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey,
228
+                    self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey,
229 229
                     __METHOD__
230 230
                 );
231 231
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                     ?? 1;
347 347
             }
348 348
             // Handle pagination
349
-            $paginationPage = 'page' . $this->paginationPage;
349
+            $paginationPage = 'page'.$this->paginationPage;
350 350
             // Get the path for the current request
351 351
             $request = Craft::$app->getRequest();
352 352
             $requestPath = '/';
@@ -362,21 +362,21 @@  discard block
 block discarded – undo
362 362
                 }
363 363
             }
364 364
             // Get our cache key
365
-            $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams();
365
+            $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams();
366 366
             // For requests with a status code of >= 400, use one cache key
367 367
             if (!$request->isConsoleRequest) {
368 368
                 $response = Craft::$app->getResponse();
369 369
                 if ($response->statusCode >= 400) {
370
-                    $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode;
370
+                    $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode;
371 371
                 }
372 372
             }
373 373
             // Load the meta containers
374 374
             $dependency = new TagDependency([
375 375
                 'tags' => [
376 376
                     self::GLOBAL_METACONTAINER_CACHE_TAG,
377
-                    self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId,
378
-                    self::METACONTAINER_CACHE_TAG . $uri . $siteId,
379
-                    self::METACONTAINER_CACHE_TAG . $cacheKey,
377
+                    self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId,
378
+                    self::METACONTAINER_CACHE_TAG.$uri.$siteId,
379
+                    self::METACONTAINER_CACHE_TAG.$cacheKey,
380 380
                 ],
381 381
             ]);
382 382
             $this->containerDependency = $dependency;
@@ -392,10 +392,10 @@  discard block
 block discarded – undo
392 392
             } else {
393 393
                 $cache = Craft::$app->getCache();
394 394
                 list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet(
395
-                    self::CACHE_KEY . $cacheKey,
396
-                    function () use ($uri, $siteId) {
395
+                    self::CACHE_KEY.$cacheKey,
396
+                    function() use ($uri, $siteId) {
397 397
                         Craft::info(
398
-                            'Meta container cache miss: ' . $uri . '/' . $siteId,
398
+                            'Meta container cache miss: '.$uri.'/'.$siteId,
399 399
                             __METHOD__
400 400
                         );
401 401
                         $this->loadGlobalMetaContainers($siteId);
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 
665 665
                     // Handle re-creating the `mainEntityOfPage` so that the model injected into the
666 666
                     // templates has the appropriate attributes
667
-                    $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE;
667
+                    $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE;
668 668
                     $generalContainer = $this->metaContainers[$generalContainerKey];
669 669
                     if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) {
670 670
                         /** @var MetaJsonLd $jsonLdModel */
@@ -916,10 +916,10 @@  discard block
 block discarded – undo
916 916
         $cache = Craft::$app->getCache();
917 917
         TagDependency::invalidate(
918 918
             $cache,
919
-            self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId
919
+            self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId
920 920
         );
921 921
         Craft::info(
922
-            'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId,
922
+            'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId,
923 923
             __METHOD__
924 924
         );
925 925
         // Trigger an event to let other plugins/modules know we've cleared our caches
@@ -946,9 +946,9 @@  discard block
 block discarded – undo
946 946
         if ($siteId === null) {
947 947
             $siteId = Craft::$app->getSites()->currentSite->id ?? 1;
948 948
         }
949
-        TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId);
949
+        TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId);
950 950
         Craft::info(
951
-            'Meta container cache cleared: ' . $uri . ' / ' . $siteId,
951
+            'Meta container cache cleared: '.$uri.' / '.$siteId,
952 952
             __METHOD__
953 953
         );
954 954
         // Trigger an event to let other plugins/modules know we've cleared our caches
Please login to merge, or discard this patch.
src/models/MetaJsonLdContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,16 +50,16 @@
 block discarded – undo
50 50
     public function includeMetaData($dependency)
51 51
     {
52 52
         Craft::beginProfile('MetaJsonLdContainer::includeMetaData', __METHOD__);
53
-        $uniqueKey = $this->handle . $dependency->tags[3] . '-v2';
53
+        $uniqueKey = $this->handle.$dependency->tags[3].'-v2';
54 54
         $cache = Craft::$app->getCache();
55 55
         if ($this->clearCache) {
56 56
             TagDependency::invalidate($cache, $dependency->tags[3]);
57 57
         }
58 58
         [$jsonLd, $attrs] = $cache->getOrSet(
59
-            self::CONTAINER_TYPE . $uniqueKey,
60
-            function () use ($uniqueKey) {
59
+            self::CONTAINER_TYPE.$uniqueKey,
60
+            function() use ($uniqueKey) {
61 61
                 Craft::info(
62
-                    self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey,
62
+                    self::CONTAINER_TYPE.' cache miss: '.$uniqueKey,
63 63
                     __METHOD__
64 64
                 );
65 65
                 $tagData = [];
Please login to merge, or discard this patch.
src/Seomatic.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         self::$cacheDuration = self::$devMode
271 271
             ? self::DEVMODE_CACHE_DURATION
272 272
             : self::$settings->metaCacheDuration ?? null;
273
-        self::$cacheDuration = self::$cacheDuration === null ? null : (int)self::$cacheDuration;
273
+        self::$cacheDuration = self::$cacheDuration === null ? null : (int) self::$cacheDuration;
274 274
         self::$environment = EnvironmentHelper::determineEnvironment();
275 275
         MetaValueHelper::cache();
276 276
         // Version helpers
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         Event::on(
346 346
             Plugins::class,
347 347
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
348
-            function (PluginEvent $event) {
348
+            function(PluginEvent $event) {
349 349
                 if ($event->plugin === $this) {
350 350
                     // Invalidate our caches after we've been installed
351 351
                     $this->clearAllCaches();
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
         Event::on(
367 367
             ClearCaches::class,
368 368
             ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
369
-            function (RegisterCacheOptionsEvent $event) {
369
+            function(RegisterCacheOptionsEvent $event) {
370 370
                 Craft::debug(
371 371
                     'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS',
372 372
                     __METHOD__
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         Event::on(
383 383
             Plugins::class,
384 384
             Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS,
385
-            function (PluginEvent $event) {
385
+            function(PluginEvent $event) {
386 386
                 if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) {
387 387
                     // For all the emojis
388 388
                     $settingsModel = $this->getSettings();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         Event::on(
436 436
             Plugins::class,
437 437
             Plugins::EVENT_AFTER_LOAD_PLUGINS,
438
-            function () {
438
+            function() {
439 439
                 // Delay registering SEO Elements to give other plugins a chance to load first
440 440
                 $this->seoElements->getAllSeoElementTypes(false);
441 441
                 // Delay installing GQL handlers to give other plugins a chance to register their own first
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
         Event::on(
457 457
             Fields::class,
458 458
             Fields::EVENT_REGISTER_FIELD_TYPES,
459
-            function (RegisterComponentTypesEvent $event) {
459
+            function(RegisterComponentTypesEvent $event) {
460 460
                 $event->types[] = SeoSettingsField::class;
461 461
                 $event->types[] = Seomatic_MetaField::class;
462 462
             }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
         Event::on(
466 466
             Elements::class,
467 467
             Elements::EVENT_AFTER_SAVE_ELEMENT,
468
-            function (ElementEvent $event) {
468
+            function(ElementEvent $event) {
469 469
                 Craft::debug(
470 470
                     'Elements::EVENT_AFTER_SAVE_ELEMENT',
471 471
                     __METHOD__
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         Event::on(
486 486
             Elements::class,
487 487
             Elements::EVENT_AFTER_DELETE_ELEMENT,
488
-            function (ElementEvent $event) {
488
+            function(ElementEvent $event) {
489 489
                 Craft::debug(
490 490
                     'Elements::EVENT_AFTER_DELETE_ELEMENT',
491 491
                     __METHOD__
@@ -504,19 +504,19 @@  discard block
 block discarded – undo
504 504
             Event::on(
505 505
                 Entry::class,
506 506
                 Entry::EVENT_REGISTER_PREVIEW_TARGETS,
507
-                function (RegisterPreviewTargetsEvent $e) {
507
+                function(RegisterPreviewTargetsEvent $e) {
508 508
                     /** @var Element $element */
509 509
                     $element = $e->sender;
510 510
                     if ($element->uri !== null) {
511 511
                         $e->previewTargets[] = [
512
-                            'label' => '
Please login to merge, or discard this patch.