Passed
Push — develop ( 90ed2c...5af6db )
by Andrew
09:42
created
src/seomatic-config/eventmeta/JsonLdContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 return [
22
-    MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE => [
22
+    MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE => [
23 23
         'name' => 'General',
24 24
         'description' => 'JsonLd Tags',
25 25
         'handle' => JsonLdService::GENERAL_HANDLE,
26
-        'class' => (string)MetaJsonLdContainer::class,
26
+        'class' => (string) MetaJsonLdContainer::class,
27 27
         'include' => true,
28 28
         'dependencies' => [
29 29
         ],
Please login to merge, or discard this patch.
src/base/MetaItem.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 // Add a URL to the schema.org type if this is a MetaJsonLD object
159 159
                 if ($isMetaJsonLdModel) {
160 160
                     /** @var  $this MetaJsonLd */
161
-                    $extraInfo = ' for http://schema.org/' . $this->type;
161
+                    $extraInfo = ' for http://schema.org/'.$this->type;
162 162
                 }
163 163
                 $errorMsg =
164 164
                     Craft::t('seomatic', 'Scenario: "')
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
                     . print_r($this->render(), true);
170 170
                 Craft::info($errorMsg, __METHOD__);
171 171
                 foreach ($this->errors as $param => $errors) {
172
-                    $errorMsg = Craft::t('seomatic', $errorLabel) . $param;
172
+                    $errorMsg = Craft::t('seomatic', $errorLabel).$param;
173 173
                     /** @var array $errors */
174 174
                     foreach ($errors as $error) {
175
-                        $errorMsg .= ' -> ' . $error;
175
+                        $errorMsg .= ' -> '.$error;
176 176
                         // Change the error level depending on the error message if this is a MetaJsonLD object
177 177
                         if ($isMetaJsonLdModel) {
178 178
                             if (strpos($error, 'recommended') !== false) {
@@ -185,15 +185,15 @@  discard block
 block discarded – undo
185 185
                             }
186 186
                         }
187 187
                     }
188
-                    Craft::info(strtoupper($logLevel) . ' - ' . $errorMsg, __METHOD__);
188
+                    Craft::info(strtoupper($logLevel).' - '.$errorMsg, __METHOD__);
189 189
                     // Extra debugging info for MetaJsonLd objects
190 190
                     if ($isMetaJsonLdModel) {
191 191
                         /** @var MetaJsonLd $className */
192 192
                         $className = \get_class($this);
193 193
                         if (!empty($className::$schemaPropertyDescriptions[$param])) {
194
-                            $errorMsg = Craft::t('seomatic', $errorLabel) . $param;
194
+                            $errorMsg = Craft::t('seomatic', $errorLabel).$param;
195 195
                             /** @var $className MetaJsonLd */
196
-                            $errorMsg .= ' -> ' . $className::$schemaPropertyDescriptions[$param];
196
+                            $errorMsg .= ' -> '.$className::$schemaPropertyDescriptions[$param];
197 197
                             Craft::info($errorMsg, __METHOD__);
198 198
                         }
199 199
                     }
Please login to merge, or discard this patch.
src/seoelements/SeoEvent.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         BaseEvent::on(
85 85
             CalendarsService::class,
86 86
             CalendarsService::EVENT_AFTER_SAVE,
87
-            function (SaveModelEvent $event) {
87
+            function(SaveModelEvent $event) {
88 88
                 Craft::debug(
89 89
                     'CalendarsService::EVENT_AFTER_DELETE',
90 90
                     __METHOD__
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         BaseEvent::on(
96 96
             CalendarsService::class,
97 97
             CalendarsService::EVENT_AFTER_DELETE,
98
-            function (DeleteModelEvent $event) {
98
+            function(DeleteModelEvent $event) {
99 99
                 Craft::debug(
100 100
                     'CalendarsService::EVENT_AFTER_DELETE',
101 101
                     __METHOD__
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             BaseEvent::on(
111 111
                 CalendarsService::class,
112 112
                 CalendarsService::EVENT_AFTER_SAVE,
113
-                function (SaveModelEvent $event) {
113
+                function(SaveModelEvent $event) {
114 114
                     Craft::debug(
115 115
                         'CalendarsService::EVENT_AFTER_SAVE',
116 116
                         __METHOD__
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             BaseEvent::on(
136 136
                 CalendarsService::class,
137 137
                 CalendarsService::EVENT_AFTER_DELETE,
138
-                function (DeleteModelEvent $event) {
138
+                function(DeleteModelEvent $event) {
139 139
                     Craft::debug(
140 140
                         'CalendarsService::EVENT_AFTER_DELETE',
141 141
                         __METHOD__
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         // Install only for non-console Control Panel requests
166 166
         if ($request->getIsCpRequest() && !$request->getIsConsoleRequest()) {
167 167
             // Events sidebar
168
-            Seomatic::$view->hook('cp.solspace.calendar.events.edit.details', function (&$context) {
168
+            Seomatic::$view->hook('cp.solspace.calendar.events.edit.details', function(&$context) {
169 169
                 $html = '';
170 170
                 Seomatic::$view->registerAssetBundle(SeomaticAsset::class);
171 171
                 /** @var Event $event */
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
         $query = Event::find()
239 239
             ->setCalendar($metaBundle->sourceHandle)
240 240
             ->setLoadOccurrences(false)
241
-            ->siteId((int)$metaBundle->sourceSiteId)
242
-            ->limit((int)$metaBundle->metaSitemapVars->sitemapLimit);
241
+            ->siteId((int) $metaBundle->sourceSiteId)
242
+            ->limit((int) $metaBundle->metaSitemapVars->sitemapLimit);
243 243
 
244 244
         return $query;
245 245
     }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
             ConfigHelper::getConfigFromFile(self::configFilePath()),
401 401
             [
402 402
                 'sourceId' => $sourceModel->id,
403
-                'sourceName' => (string)$sourceModel->name,
403
+                'sourceName' => (string) $sourceModel->name,
404 404
                 'sourceHandle' => $sourceModel->handle,
405 405
             ]
406 406
         );
Please login to merge, or discard this patch.
src/services/ServicesTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
         // Constants aren't allowed in traits until PHP >= 8.2
59 59
         $majorVersion = '3';
60 60
         // Dev server container name & port are based on the major version of this plugin
61
-        $devPort = 3000 + (int)$majorVersion;
62
-        $versionName = 'v' . $majorVersion;
61
+        $devPort = 3000 + (int) $majorVersion;
62
+        $versionName = 'v'.$majorVersion;
63 63
         // Merge in the passed config, so it our config can be overridden by Plugins::pluginConfigs['vite']
64 64
         // ref: https://github.com/craftcms/cms/issues/1989
65 65
         $config = ArrayHelper::merge([
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
                     'assetClass' => SeomaticAsset::class,
81 81
                     'checkDevServer' => true,
82 82
                     'class' => VitePluginService::class,
83
-                    'devServerInternal' => 'http://craft-seomatic-' . $versionName . '-buildchain-dev:' . $devPort,
84
-                    'devServerPublic' => 'http://localhost:' . $devPort,
83
+                    'devServerInternal' => 'http://craft-seomatic-'.$versionName.'-buildchain-dev:'.$devPort,
84
+                    'devServerPublic' => 'http://localhost:'.$devPort,
85 85
                     'errorEntry' => 'src/js/seomatic.js',
86 86
                     'useDevServer' => true,
87 87
                 ],
Please login to merge, or discard this patch.
src/helpers/Text.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if (!empty($string)) {
77 77
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
78 78
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
79
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
79
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
80 80
         }
81 81
 
82 82
         return $result;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         if (!empty($string)) {
102 102
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
103 103
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
104
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
104
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
105 105
         }
106 106
 
107 107
         return $result;
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
             $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw()));
136 136
         } else {
137 137
             if (\is_array($field)) {
138
-                $result = self::smartStripTags((string)$field[0]);
138
+                $result = self::smartStripTags((string) $field[0]);
139 139
             } else {
140
-                $result = self::smartStripTags((string)$field);
140
+                $result = self::smartStripTags((string) $field);
141 141
             }
142 142
         }
143 143
 
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
         $result = \is_array($keywords)
345 345
             ? implode(', ', \array_slice(array_keys($keywords), 0, $limit))
346
-            : (string)$keywords;
346
+            : (string) $keywords;
347 347
 
348 348
         return self::sanitizeUserInput($result);
349 349
     }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 
382 382
         $result = \is_array($sentences)
383 383
             ? implode(' ', $sentences)
384
-            : (string)$sentences;
384
+            : (string) $sentences;
385 385
 
386 386
         return self::sanitizeUserInput($result);
387 387
     }
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
402 402
         $str = rawurldecode($str);
403 403
         // Remove any linebreaks
404
-        $str = (string)preg_replace("/\r|\n/", "", $str);
404
+        $str = (string) preg_replace("/\r|\n/", "", $str);
405 405
         $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']);
406 406
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
407 407
         // Remove any embedded Twig code
Please login to merge, or discard this patch.
src/seomatic-config/globalmeta/TagContainer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
  */
21 21
 
22 22
 return [
23
-    MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [
23
+    MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [
24 24
         'name' => 'General',
25 25
         'description' => 'General Meta Tags',
26 26
         'handle' => TagService::GENERAL_HANDLE,
27
-        'class' => (string)MetaTagContainer::class,
27
+        'class' => (string) MetaTagContainer::class,
28 28
         'include' => true,
29 29
         'dependencies' => [
30 30
         ],
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
             ],
77 77
         ],
78 78
     ],
79
-    MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [
79
+    MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [
80 80
         'name' => 'Facebook',
81 81
         'description' => 'Facebook OpenGraph Meta Tags',
82 82
         'handle' => TagService::FACEBOOK_HANDLE,
83
-        'class' => (string)MetaTagContainer::class,
83
+        'class' => (string) MetaTagContainer::class,
84 84
         'include' => true,
85 85
         'dependencies' => [
86 86
         ],
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
             ],
207 207
         ],
208 208
     ],
209
-    MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [
209
+    MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [
210 210
         'name' => 'Twitter',
211 211
         'description' => 'Twitter Card Meta Tags',
212 212
         'handle' => TagService::TWITTER_HANDLE,
213 213
         'include' => true,
214
-        'class' => (string)MetaTagContainer::class,
214
+        'class' => (string) MetaTagContainer::class,
215 215
         'data' => [
216 216
             'twitter:card' => [
217 217
                 'charset' => '',
@@ -287,11 +287,11 @@  discard block
 block discarded – undo
287 287
             ],
288 288
         ],
289 289
     ],
290
-    MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [
290
+    MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [
291 291
         'name' => 'Miscellaneous',
292 292
         'description' => 'Miscellaneous Meta Tags',
293 293
         'handle' => TagService::MISC_HANDLE,
294
-        'class' => (string)MetaTagContainer::class,
294
+        'class' => (string) MetaTagContainer::class,
295 295
         'include' => true,
296 296
         'dependencies' => [
297 297
         ],
Please login to merge, or discard this patch.
src/helpers/Schema.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             // Go from most specific type to least specific type
95 95
             foreach (self::SCHEMA_TYPES as $schemaType) {
96 96
                 if (!empty($settings[$schemaType]) && ($settings[$schemaType] !== 'none')) {
97
-                    $result = $settings[$schemaType] . self::SCHEMA_PATH_DELIMITER . $result;
97
+                    $result = $settings[$schemaType].self::SCHEMA_PATH_DELIMITER.$result;
98 98
                 }
99 99
             }
100 100
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                 if (isset($result['schemaTypeDescription'])) {
127 127
                     $description = $result['schemaTypeDescription'];
128 128
                     $description = preg_replace("`\[\[([A-z]*)\]\]`", '[$1](https://schema.org/$1)', $description);
129
-                    $description = Markdown::process((string)$description);
129
+                    $description = Markdown::process((string) $description);
130 130
                     $description = str_replace(['<p>', '</p>', '\n'], ['', '', ' '], $description);
131 131
                     $result['schemaTypeDescription'] = $description;
132 132
                 }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $result = [];
149 149
         while ($schemaType) {
150
-            $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $schemaType;
150
+            $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$schemaType;
151 151
             if (class_exists($className)) {
152 152
                 try {
153 153
                     $classRef = new \ReflectionClass($className);
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
         $dependency = new TagDependency([
255 255
             'tags' => [
256 256
                 self::GLOBAL_SCHEMA_CACHE_TAG,
257
-                self::SCHEMA_CACHE_TAG . 'schemaArray',
257
+                self::SCHEMA_CACHE_TAG.'schemaArray',
258 258
             ],
259 259
         ]);
260 260
         $cache = Craft::$app->getCache();
261 261
         $typesArray = $cache->getOrSet(
262
-            self::CACHE_KEY . 'schemaArray',
263
-            function () use ($path) {
262
+            self::CACHE_KEY.'schemaArray',
263
+            function() use ($path) {
264 264
                 Craft::info(
265
-                    'schemaArray cache miss: ' . $path,
265
+                    'schemaArray cache miss: '.$path,
266 266
                     __METHOD__
267 267
                 );
268 268
                 $filePath = Craft::getAlias('@nystudio107/seomatic/resources/schema/tree.jsonld');
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
         $dependency = new TagDependency([
356 356
             'tags' => [
357 357
                 self::GLOBAL_SCHEMA_CACHE_TAG,
358
-                self::SCHEMA_CACHE_TAG . 'schemaTree',
358
+                self::SCHEMA_CACHE_TAG.'schemaTree',
359 359
             ],
360 360
         ]);
361 361
         $cache = Craft::$app->getCache();
362 362
         $typesArray = $cache->getOrSet(
363
-            self::CACHE_KEY . 'schemaTree',
364
-            function () {
363
+            self::CACHE_KEY.'schemaTree',
364
+            function() {
365 365
                 Craft::info(
366 366
                     'schemaTree cache miss',
367 367
                     __METHOD__
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
         foreach ($typesArray as $key => $value) {
397 397
             $indent = html_entity_decode(str_repeat('&nbsp;', $indentLevel));
398 398
             if (\is_array($value)) {
399
-                $result[$key] = $indent . $key;
399
+                $result[$key] = $indent.$key;
400 400
                 $value = self::flattenSchemaArray($value, $indentLevel + self::MENU_INDENT_STEP);
401 401
                 $result = array_merge($result, $value);
402 402
             } else {
403
-                $result[$key] = $indent . $value;
403
+                $result[$key] = $indent.$value;
404 404
             }
405 405
         }
406 406
 
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
             $children = [];
495 495
             $name = $typesArray['name'];
496 496
             // Construct a path-based $id, excluding the top-level `Thing` schema
497
-            $id = $name === 'Thing' ? '' : $path . self::SCHEMA_PATH_DELIMITER . $name;
497
+            $id = $name === 'Thing' ? '' : $path.self::SCHEMA_PATH_DELIMITER.$name;
498 498
             $id = ltrim($id, self::SCHEMA_PATH_DELIMITER);
499 499
             // Make sure we have at most 3 specifiers in the schema path
500 500
             $parts = explode(self::SCHEMA_PATH_DELIMITER, $id);
@@ -521,12 +521,12 @@  discard block
 block discarded – undo
521 521
             $schemaPath = explode(self::SCHEMA_PATH_DELIMITER, $id);
522 522
             // Use only the specific (last) type for now, rather than the complete path of types
523 523
             $schemaPath = [end($schemaPath)];
524
-            if ((bool)array_intersect($schemaPath, array_keys($googleRichSnippetTypes))) {
525
-                $name .= ' (' . Craft::t('seomatic', 'Google rich result') . ')';
524
+            if ((bool) array_intersect($schemaPath, array_keys($googleRichSnippetTypes))) {
525
+                $name .= ' ('.Craft::t('seomatic', 'Google rich result').')';
526 526
             }
527 527
             // Mark it as pending, if applicable
528 528
             if (isset($typesArray['pending']) && $typesArray['pending']) {
529
-                $name .= ' (' . Craft::t('seomatic', 'pending') . ')';
529
+                $name .= ' ('.Craft::t('seomatic', 'pending').')';
530 530
             }
531 531
             $result['label'] = $name;
532 532
             $result['id'] = $id;
@@ -545,13 +545,13 @@  discard block
 block discarded – undo
545 545
         $dependency = new TagDependency([
546 546
             'tags' => [
547 547
                 self::GLOBAL_SCHEMA_CACHE_TAG,
548
-                self::SCHEMA_CACHE_TAG . 'googleRichSnippets',
548
+                self::SCHEMA_CACHE_TAG.'googleRichSnippets',
549 549
             ],
550 550
         ]);
551 551
         $cache = Craft::$app->getCache();
552 552
         return $cache->getOrSet(
553
-            self::CACHE_KEY . 'googleRichSnippets',
554
-            function () {
553
+            self::CACHE_KEY.'googleRichSnippets',
554
+            function() {
555 555
                 Craft::info(
556 556
                     'googleRichSnippets cache miss',
557 557
                     __METHOD__
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.