@@ -40,12 +40,12 @@ discard block |
||
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 |
||
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,7 +142,7 @@ discard block |
||
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']; |
@@ -155,15 +155,15 @@ discard block |
||
155 | 155 | foreach ($query as $j => $value) { |
156 | 156 | $value = explode('=', $value, 2); |
157 | 157 | if (count($value) === 2) { |
158 | - $query[$j] = urlencode($value[0]) . '=' . urlencode($value[1]); |
|
158 | + $query[$j] = urlencode($value[0]).'='.urlencode($value[1]); |
|
159 | 159 | } else { |
160 | 160 | $query[$j] = urlencode($value[0]); |
161 | 161 | } |
162 | 162 | } |
163 | - $encodedUrl .= '?' . implode('&', $query); |
|
163 | + $encodedUrl .= '?'.implode('&', $query); |
|
164 | 164 | } |
165 | 165 | if (isset($urlParts['fragment'])) { |
166 | - $encodedUrl .= '#' . $urlParts['fragment']; |
|
166 | + $encodedUrl .= '#'.$urlParts['fragment']; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | return $encodedUrl; |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | |
197 | 197 | if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) { |
198 | 198 | $url_parts = parse_url($pathOrUrl); |
199 | - $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host']; |
|
199 | + $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host']; |
|
200 | 200 | $result['path'] = $url_parts['path'] ?? ''; |
201 | 201 | $result['suffix'] = ''; |
202 | - $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query']; |
|
203 | - $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment']; |
|
202 | + $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query']; |
|
203 | + $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment']; |
|
204 | 204 | } else { |
205 | 205 | $result['prefix'] = ''; |
206 | 206 | $result['path'] = $pathOrUrl; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | BaseEvent::on( |
87 | 87 | CalendarsService::class, |
88 | 88 | CalendarsService::EVENT_AFTER_SAVE, |
89 | - function (SaveModelEvent $event) { |
|
89 | + function(SaveModelEvent $event) { |
|
90 | 90 | Craft::debug( |
91 | 91 | 'CalendarsService::EVENT_AFTER_DELETE', |
92 | 92 | __METHOD__ |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | BaseEvent::on( |
98 | 98 | CalendarsService::class, |
99 | 99 | CalendarsService::EVENT_AFTER_DELETE, |
100 | - function (DeleteModelEvent $event) { |
|
100 | + function(DeleteModelEvent $event) { |
|
101 | 101 | Craft::debug( |
102 | 102 | 'CalendarsService::EVENT_AFTER_DELETE', |
103 | 103 | __METHOD__ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | BaseEvent::on( |
113 | 113 | CalendarsService::class, |
114 | 114 | CalendarsService::EVENT_AFTER_SAVE, |
115 | - function (SaveModelEvent $event) { |
|
115 | + function(SaveModelEvent $event) { |
|
116 | 116 | Craft::debug( |
117 | 117 | 'CalendarsService::EVENT_AFTER_SAVE', |
118 | 118 | __METHOD__ |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | BaseEvent::on( |
138 | 138 | CalendarsService::class, |
139 | 139 | CalendarsService::EVENT_AFTER_DELETE, |
140 | - function (DeleteModelEvent $event) { |
|
140 | + function(DeleteModelEvent $event) { |
|
141 | 141 | Craft::debug( |
142 | 142 | 'CalendarsService::EVENT_AFTER_DELETE', |
143 | 143 | __METHOD__ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | BaseEvent::on( |
169 | 169 | Event::class, |
170 | 170 | Event::EVENT_DEFINE_SIDEBAR_HTML, |
171 | - static function (DefineHtmlEvent $event) { |
|
171 | + static function(DefineHtmlEvent $event) { |
|
172 | 172 | Craft::debug( |
173 | 173 | 'Entry::EVENT_DEFINE_SIDEBAR_HTML', |
174 | 174 | __METHOD__ |
@@ -243,8 +243,8 @@ discard block |
||
243 | 243 | $query = Event::find() |
244 | 244 | ->setCalendar($metaBundle->sourceHandle) |
245 | 245 | ->setLoadOccurrences(false) |
246 | - ->siteId((int)$metaBundle->sourceSiteId) |
|
247 | - ->limit((int)$metaBundle->metaSitemapVars->sitemapLimit); |
|
246 | + ->siteId((int) $metaBundle->sourceSiteId) |
|
247 | + ->limit((int) $metaBundle->metaSitemapVars->sitemapLimit); |
|
248 | 248 | |
249 | 249 | return $query; |
250 | 250 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
406 | 406 | [ |
407 | 407 | 'sourceId' => $sourceModel->id, |
408 | - 'sourceName' => (string)$sourceModel->name, |
|
408 | + 'sourceName' => (string) $sourceModel->name, |
|
409 | 409 | 'sourceHandle' => $sourceModel->handle, |
410 | 410 | ] |
411 | 411 | ); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | // so we can't extract it from the passed in $config |
64 | 64 | $majorVersion = '4'; |
65 | 65 | // Dev server container name & port are based on the major version of this plugin |
66 | - $devPort = 3000 + (int)$majorVersion; |
|
67 | - $versionName = 'v' . $majorVersion; |
|
66 | + $devPort = 3000 + (int) $majorVersion; |
|
67 | + $versionName = 'v'.$majorVersion; |
|
68 | 68 | return [ |
69 | 69 | 'components' => [ |
70 | 70 | 'frontendTemplates' => FrontendTemplatesService::class, |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | 'assetClass' => SeomaticAsset::class, |
84 | 84 | 'checkDevServer' => true, |
85 | 85 | 'class' => VitePluginService::class, |
86 | - 'devServerInternal' => 'http://craft-seomatic-' . $versionName . '-buildchain-dev:' . $devPort, |
|
87 | - 'devServerPublic' => 'http://localhost:' . $devPort, |
|
86 | + 'devServerInternal' => 'http://craft-seomatic-'.$versionName.'-buildchain-dev:'.$devPort, |
|
87 | + 'devServerPublic' => 'http://localhost:'.$devPort, |
|
88 | 88 | 'errorEntry' => 'src/js/seomatic.js', |
89 | 89 | 'useDevServer' => true, |
90 | 90 | ], |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if (!empty($string)) { |
73 | 73 | $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']); |
74 | 74 | $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8'); |
75 | - $result = (string)Stringy::create($string)->truncate($length, $substring); |
|
75 | + $result = (string) Stringy::create($string)->truncate($length, $substring); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $result; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if (!empty($string)) { |
98 | 98 | $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']); |
99 | 99 | $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8'); |
100 | - $result = (string)Stringy::create($string)->safeTruncate($length, $substring); |
|
100 | + $result = (string) Stringy::create($string)->safeTruncate($length, $substring); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | return $result; |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw())); |
132 | 132 | } else { |
133 | 133 | if (is_array($field)) { |
134 | - $result = self::smartStripTags((string)$field[0]); |
|
134 | + $result = self::smartStripTags((string) $field[0]); |
|
135 | 135 | } else { |
136 | - $result = self::smartStripTags((string)$field); |
|
136 | + $result = self::smartStripTags((string) $field); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $tags = $tags->all(); |
161 | 161 | } |
162 | 162 | foreach ($tags as $tag) { |
163 | - $result .= $tag->title . ', '; |
|
163 | + $result .= $tag->title.', '; |
|
164 | 164 | } |
165 | 165 | $result = rtrim($result, ', '); |
166 | 166 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | foreach ($fieldClasses as $fieldClassKey) { |
203 | 203 | if ($field instanceof $fieldClassKey) { |
204 | 204 | if ($field->handle === $fieldHandle || empty($fieldHandle)) { |
205 | - $result .= self::extractTextFromField($block[$field->handle]) . ' '; |
|
205 | + $result .= self::extractTextFromField($block[$field->handle]).' '; |
|
206 | 206 | } |
207 | 207 | } |
208 | 208 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | foreach ($fieldClasses as $fieldClassKey) { |
249 | 249 | if ($field instanceof $fieldClassKey) { |
250 | 250 | if ($field->handle === $fieldHandle || empty($fieldHandle)) { |
251 | - $result .= self::extractTextFromField($block[$field->handle]) . ' '; |
|
251 | + $result .= self::extractTextFromField($block[$field->handle]).' '; |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | foreach ($fieldClasses as $fieldClassKey) { |
295 | 295 | if ($field instanceof $fieldClassKey) { |
296 | 296 | if ($field->handle === $fieldHandle || empty($fieldHandle)) { |
297 | - $result .= self::extractTextFromField($block[$field->handle]) . ' '; |
|
297 | + $result .= self::extractTextFromField($block[$field->handle]).' '; |
|
298 | 298 | } |
299 | 299 | } |
300 | 300 | } |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | $result = is_array($keywords) |
341 | 341 | ? implode(', ', array_slice(array_keys($keywords), 0, $limit)) |
342 | - : (string)$keywords; |
|
342 | + : (string) $keywords; |
|
343 | 343 | |
344 | 344 | return self::sanitizeUserInput($result); |
345 | 345 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | $result = is_array($sentences) |
379 | 379 | ? implode(' ', $sentences) |
380 | - : (string)$sentences; |
|
380 | + : (string) $sentences; |
|
381 | 381 | |
382 | 382 | return self::sanitizeUserInput($result); |
383 | 383 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8'); |
398 | 398 | $str = rawurldecode($str); |
399 | 399 | // Remove any linebreaks |
400 | - $str = (string)preg_replace("/\r|\n/", "", $str); |
|
400 | + $str = (string) preg_replace("/\r|\n/", "", $str); |
|
401 | 401 | $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']); |
402 | 402 | $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8'); |
403 | 403 | // Remove any embedded Twig code |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $language = 'English'; |
478 | 478 | } |
479 | 479 | |
480 | - $className = 'PhpScience\\TextRank\\Tool\\StopWords\\' . ucfirst($language); |
|
480 | + $className = 'PhpScience\\TextRank\\Tool\\StopWords\\'.ucfirst($language); |
|
481 | 481 | if (class_exists($className)) { |
482 | 482 | $stopWords = new $className; |
483 | 483 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | // Go from most specific type to least specific type |
94 | 94 | foreach (self::SCHEMA_TYPES as $schemaType) { |
95 | 95 | if (!empty($settings[$schemaType]) && ($settings[$schemaType] !== 'none')) { |
96 | - $result = $settings[$schemaType] . self::SCHEMA_PATH_DELIMITER . $result; |
|
96 | + $result = $settings[$schemaType].self::SCHEMA_PATH_DELIMITER.$result; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | $result = []; |
141 | 141 | while ($schemaType) { |
142 | - $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $schemaType; |
|
142 | + $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$schemaType; |
|
143 | 143 | if (class_exists($className)) { |
144 | 144 | try { |
145 | 145 | $classRef = new \ReflectionClass($className); |
@@ -246,15 +246,15 @@ discard block |
||
246 | 246 | $dependency = new TagDependency([ |
247 | 247 | 'tags' => [ |
248 | 248 | self::GLOBAL_SCHEMA_CACHE_TAG, |
249 | - self::SCHEMA_CACHE_TAG . 'schemaArray', |
|
249 | + self::SCHEMA_CACHE_TAG.'schemaArray', |
|
250 | 250 | ], |
251 | 251 | ]); |
252 | 252 | $cache = Craft::$app->getCache(); |
253 | 253 | $typesArray = $cache->getOrSet( |
254 | - self::CACHE_KEY . 'schemaArray', |
|
255 | - function () use ($path) { |
|
254 | + self::CACHE_KEY.'schemaArray', |
|
255 | + function() use ($path) { |
|
256 | 256 | Craft::info( |
257 | - 'schemaArray cache miss' . $path, |
|
257 | + 'schemaArray cache miss'.$path, |
|
258 | 258 | __METHOD__ |
259 | 259 | ); |
260 | 260 | $filePath = Craft::getAlias('@nystudio107/seomatic/resources/schema/tree.jsonld'); |
@@ -295,13 +295,13 @@ discard block |
||
295 | 295 | $dependency = new TagDependency([ |
296 | 296 | 'tags' => [ |
297 | 297 | self::GLOBAL_SCHEMA_CACHE_TAG, |
298 | - self::SCHEMA_CACHE_TAG . 'schemaTree', |
|
298 | + self::SCHEMA_CACHE_TAG.'schemaTree', |
|
299 | 299 | ], |
300 | 300 | ]); |
301 | 301 | $cache = Craft::$app->getCache(); |
302 | 302 | $typesArray = $cache->getOrSet( |
303 | - self::CACHE_KEY . 'schemaArray', |
|
304 | - function () { |
|
303 | + self::CACHE_KEY.'schemaArray', |
|
304 | + function() { |
|
305 | 305 | Craft::info( |
306 | 306 | 'schemaTree cache miss', |
307 | 307 | __METHOD__ |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | foreach ($typesArray as $key => $value) { |
337 | 337 | $indent = html_entity_decode(str_repeat(' ', $indentLevel)); |
338 | 338 | if (\is_array($value)) { |
339 | - $result[$key] = $indent . $key; |
|
339 | + $result[$key] = $indent.$key; |
|
340 | 340 | $value = self::flattenSchemaArray($value, $indentLevel + self::MENU_INDENT_STEP); |
341 | 341 | $result = array_merge($result, $value); |
342 | 342 | } else { |
343 | - $result[$key] = $indent . $value; |
|
343 | + $result[$key] = $indent.$value; |
|
344 | 344 | } |
345 | 345 | } |
346 | 346 | |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $children = []; |
435 | 435 | $name = $typesArray['name']; |
436 | 436 | // Construct a path-based $id, excluding the top-level `Thing` schema |
437 | - $id = $name === 'Thing' ? '' : $path . self::SCHEMA_PATH_DELIMITER . $name; |
|
437 | + $id = $name === 'Thing' ? '' : $path.self::SCHEMA_PATH_DELIMITER.$name; |
|
438 | 438 | $id = ltrim($id, self::SCHEMA_PATH_DELIMITER); |
439 | 439 | // Make sure we have at most 3 specifiers in the schema path |
440 | 440 | $parts = explode(self::SCHEMA_PATH_DELIMITER, $id); |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $schemaPath = explode(self::SCHEMA_PATH_DELIMITER, $id); |
466 | 466 | // Use only the specific (last) type for now, rather than the complete path of types |
467 | 467 | $schemaPath = [end($schemaPath)]; |
468 | - if ((bool)array_intersect($schemaPath, array_keys($googleRichSnippetTypes))) { |
|
468 | + if ((bool) array_intersect($schemaPath, array_keys($googleRichSnippetTypes))) { |
|
469 | 469 | $name .= ' (Google rich snippet)'; |
470 | 470 | } |
471 | 471 | } |
@@ -486,13 +486,13 @@ discard block |
||
486 | 486 | $dependency = new TagDependency([ |
487 | 487 | 'tags' => [ |
488 | 488 | self::GLOBAL_SCHEMA_CACHE_TAG, |
489 | - self::SCHEMA_CACHE_TAG . 'googleRichSnippets', |
|
489 | + self::SCHEMA_CACHE_TAG.'googleRichSnippets', |
|
490 | 490 | ], |
491 | 491 | ]); |
492 | 492 | $cache = Craft::$app->getCache(); |
493 | 493 | return $cache->getOrSet( |
494 | - self::CACHE_KEY . 'googleRichSnippets', |
|
495 | - function () { |
|
494 | + self::CACHE_KEY.'googleRichSnippets', |
|
495 | + function() { |
|
496 | 496 | Craft::info( |
497 | 497 | 'googleRichSnippets cache miss', |
498 | 498 | __METHOD__ |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | $lastSegment = end($segments); |
344 | 344 | $site = Craft::$app->getSites()->getSiteByHandle($lastSegment); |
345 | 345 | if ($site !== null) { |
346 | - $siteSuffix = '/' . $lastSegment; |
|
346 | + $siteSuffix = '/'.$lastSegment; |
|
347 | 347 | } |
348 | 348 | } |
349 | 349 | $currentUser = Craft::$app->getUser()->getIdentity(); |
@@ -351,31 +351,31 @@ discard block |
||
351 | 351 | if ($currentUser->can('seomatic:dashboard')) { |
352 | 352 | $subNavs['dashboard'] = [ |
353 | 353 | 'label' => Craft::t('seomatic', 'Dashboard'), |
354 | - 'url' => 'seomatic/dashboard' . $siteSuffix, |
|
354 | + 'url' => 'seomatic/dashboard'.$siteSuffix, |
|
355 | 355 | ]; |
356 | 356 | } |
357 | 357 | if ($currentUser->can('seomatic:global-meta')) { |
358 | 358 | $subNavs['global'] = [ |
359 | 359 | 'label' => Craft::t('seomatic', 'Global SEO'), |
360 | - 'url' => 'seomatic/global/general' . $siteSuffix, |
|
360 | + 'url' => 'seomatic/global/general'.$siteSuffix, |
|
361 | 361 | ]; |
362 | 362 | } |
363 | 363 | if ($currentUser->can('seomatic:content-meta')) { |
364 | 364 | $subNavs['content'] = [ |
365 | 365 | 'label' => Craft::t('seomatic', 'Content SEO'), |
366 | - 'url' => 'seomatic/content' . $siteSuffix, |
|
366 | + 'url' => 'seomatic/content'.$siteSuffix, |
|
367 | 367 | ]; |
368 | 368 | } |
369 | 369 | if ($currentUser->can('seomatic:site-settings')) { |
370 | 370 | $subNavs['site'] = [ |
371 | 371 | 'label' => Craft::t('seomatic', 'Site Settings'), |
372 | - 'url' => 'seomatic/site/identity' . $siteSuffix, |
|
372 | + 'url' => 'seomatic/site/identity'.$siteSuffix, |
|
373 | 373 | ]; |
374 | 374 | } |
375 | 375 | if ($currentUser->can('seomatic:tracking-scripts')) { |
376 | 376 | $subNavs['tracking'] = [ |
377 | 377 | 'label' => Craft::t('seomatic', 'Tracking Scripts'), |
378 | - 'url' => 'seomatic/tracking/gtag' . $siteSuffix, |
|
378 | + 'url' => 'seomatic/tracking/gtag'.$siteSuffix, |
|
379 | 379 | ]; |
380 | 380 | } |
381 | 381 | $editableSettings = true; |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | Event::on( |
421 | 421 | Plugins::class, |
422 | 422 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
423 | - function (PluginEvent $event) { |
|
423 | + function(PluginEvent $event) { |
|
424 | 424 | if ($event->plugin === $this) { |
425 | 425 | // Invalidate our caches after we've been installed |
426 | 426 | $this->clearAllCaches(); |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | Event::on( |
442 | 442 | ClearCaches::class, |
443 | 443 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
444 | - function (RegisterCacheOptionsEvent $event) { |
|
444 | + function(RegisterCacheOptionsEvent $event) { |
|
445 | 445 | Craft::debug( |
446 | 446 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
447 | 447 | __METHOD__ |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | Event::on( |
458 | 458 | Plugins::class, |
459 | 459 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, |
460 | - function (PluginEvent $event) { |
|
460 | + function(PluginEvent $event) { |
|
461 | 461 | if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { |
462 | 462 | // For all the emojis |
463 | 463 | $settingsModel = $this->getSettings(); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | Event::on( |
488 | 488 | Plugins::class, |
489 | 489 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
490 | - function () { |
|
490 | + function() { |
|
491 | 491 | // Delay registering SEO Elements to give other plugins a chance to load first |
492 | 492 | $this->seoElements->getAllSeoElementTypes(false); |
493 | 493 | // Delay installing GQL handlers to give other plugins a chance to register their own first |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | Event::on( |
509 | 509 | Fields::class, |
510 | 510 | Fields::EVENT_REGISTER_FIELD_TYPES, |
511 | - static function (RegisterComponentTypesEvent $event) { |
|
511 | + static function(RegisterComponentTypesEvent $event) { |
|
512 | 512 | $event->types[] = SeoSettingsField::class; |
513 | 513 | $event->types[] = Seomatic_MetaField::class; |
514 | 514 | } |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | Event::on( |
518 | 518 | Elements::class, |
519 | 519 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
520 | - static function (ElementEvent $event) { |
|
520 | + static function(ElementEvent $event) { |
|
521 | 521 | Craft::debug( |
522 | 522 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
523 | 523 | __METHOD__ |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | Event::on( |
538 | 538 | Elements::class, |
539 | 539 | Elements::EVENT_AFTER_DELETE_ELEMENT, |
540 | - static function (ElementEvent $event) { |
|
540 | + static function(ElementEvent $event) { |
|
541 | 541 | Craft::debug( |
542 | 542 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', |
543 | 543 | __METHOD__ |
@@ -556,19 +556,19 @@ discard block |
||
556 | 556 | Event::on( |
557 | 557 | Entry::class, |
558 | 558 | Element::EVENT_REGISTER_PREVIEW_TARGETS, |
559 | - static function (RegisterPreviewTargetsEvent $e) { |
|
559 | + static function(RegisterPreviewTargetsEvent $e) { |
|
560 | 560 | /** @var Element $element */ |
561 | 561 | $element = $e->sender; |
562 | 562 | if ($element->uri !== null) { |
563 | 563 | $e->previewTargets[] = [ |
564 | - 'label' => ' |