Test Failed
Push — develop-v4 ( 27c030...e0dd41 )
by Andrew
17:13 queued 07:50
created
src/helpers/DynamicMeta.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         if ($pageInfo !== null && $pageInfo->currentPage !== null) {
86 86
             // Let the meta containers know that this page is paginated
87
-            Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage;
87
+            Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage;
88 88
             // See if we should strip the query params
89 89
             $stripQueryParams = true;
90 90
             $pageTrigger = Craft::$app->getConfig()->getGeneral()->pageTrigger;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                     if (is_array($content)) {
158 158
                         $headerValue = '';
159 159
                         foreach ($content as $contentVal) {
160
-                            $headerValue .= ($contentVal . ',');
160
+                            $headerValue .= ($contentVal.',');
161 161
                         }
162 162
                         $headerValue = rtrim($headerValue, ',');
163 163
                     } else {
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
                     if (is_array($href)) {
177 177
                         $headerValue = '';
178 178
                         foreach ($href as $hrefVal) {
179
-                            $headerValue .= ('<' . $hrefVal . '>' . ',');
179
+                            $headerValue .= ('<'.$hrefVal.'>'.',');
180 180
                         }
181 181
                         $headerValue = rtrim($headerValue, ',');
182 182
                     } else {
183
-                        $headerValue = '<' . $href . '>';
183
+                        $headerValue = '<'.$href.'>';
184 184
                     }
185 185
                     $headerValue .= "; rel='canonical'";
186 186
                     $response->headers->add('Link', $headerValue);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                     if (is_array($content)) {
197 197
                         $headerValue = '';
198 198
                         foreach ($content as $contentVal) {
199
-                            $headerValue .= ($contentVal . ',');
199
+                            $headerValue .= ($contentVal.',');
200 200
                         }
201 201
                         $headerValue = rtrim($headerValue, ',');
202 202
                     } else {
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         if ($lastElement && $element) {
383 383
             if ($lastElement->uri !== '__home__' && $element->uri) {
384 384
                 $path = $lastElement->uri;
385
-                $segments = array_values(array_filter(explode('/', $path), function ($segment) {
385
+                $segments = array_values(array_filter(explode('/', $path), function($segment) {
386 386
                     return $segment !== '';
387 387
                 }));
388 388
             }
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
                     $element = $elements->getElementByUri($url, $site->id, false);
543 543
                 }
544 544
                 if ($element !== null) {
545
-                    if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) {
545
+                    if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) {
546 546
                         $includeUrl = false;
547 547
                     }
548 548
                     /** @var MetaBundle $metaBundle */
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
                             $seoSettingsField = Craft::$app->getFields()->getFieldByHandle($fieldHandle);
577 577
                             if ($fieldMetaBundle !== null && $seoSettingsField !== null && $seoSettingsField->sitemapTabEnabled) {
578 578
                                 // If sitemaps are off for this entry, don't include the URL
579
-                                if (in_array('sitemapUrls', (array)$seoSettingsField->sitemapEnabledFields, false)
579
+                                if (in_array('sitemapUrls', (array) $seoSettingsField->sitemapEnabledFields, false)
580 580
                                     && !$fieldMetaBundle->metaSitemapVars->sitemapUrls
581 581
                                     && !Seomatic::$plugin->helper->isInherited($fieldMetaBundle->metaSitemapVars, 'sitemapUrls')
582 582
                                 ) {
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
                 if (isset($value[$day][$time])
796 796
                     && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false
797 797
                 ) {
798
-                    $normalized[$day][$time] = (array)($date);
798
+                    $normalized[$day][$time] = (array) ($date);
799 799
                 } else {
800 800
                     $normalized[$day][$time] = null;
801 801
                 }
Please login to merge, or discard this patch.
src/seoelements/SeoEntry.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         Event::on(
109 109
             Sections::class,
110 110
             Sections::EVENT_AFTER_SAVE_SECTION,
111
-            function (SectionEvent $event) {
111
+            function(SectionEvent $event) {
112 112
                 Craft::debug(
113 113
                     'Sections::EVENT_AFTER_SAVE_SECTION',
114 114
                     __METHOD__
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         Event::on(
120 120
             Sections::class,
121 121
             Sections::EVENT_AFTER_DELETE_SECTION,
122
-            function (SectionEvent $event) {
122
+            function(SectionEvent $event) {
123 123
                 Craft::debug(
124 124
                     'Sections::EVENT_AFTER_DELETE_SECTION',
125 125
                     __METHOD__
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             Event::on(
135 135
                 Sections::class,
136 136
                 Sections::EVENT_AFTER_SAVE_SECTION,
137
-                function (SectionEvent $event) {
137
+                function(SectionEvent $event) {
138 138
                     Craft::debug(
139 139
                         'Sections::EVENT_AFTER_SAVE_SECTION',
140 140
                         __METHOD__
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             Event::on(
158 158
                 Sections::class,
159 159
                 Sections::EVENT_AFTER_DELETE_SECTION,
160
-                function (SectionEvent $event) {
160
+                function(SectionEvent $event) {
161 161
                     Craft::debug(
162 162
                         'Sections::EVENT_AFTER_DELETE_SECTION',
163 163
                         __METHOD__
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         Event::on(
187 187
             Entry::class,
188 188
             Entry::EVENT_DEFINE_SIDEBAR_HTML,
189
-            static function (DefineHtmlEvent $event) {
189
+            static function(DefineHtmlEvent $event) {
190 190
                 Craft::debug(
191 191
                     'Entry::EVENT_DEFINE_SIDEBAR_HTML',
192 192
                     __METHOD__
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             ->limit($metaBundle->metaSitemapVars->sitemapLimit);
228 228
         if ($metaBundle->sourceType === 'structure'
229 229
             && !empty($metaBundle->metaSitemapVars->structureDepth)) {
230
-            $query->level('<=' . $metaBundle->metaSitemapVars->structureDepth);
230
+            $query->level('<='.$metaBundle->metaSitemapVars->structureDepth);
231 231
         }
232 232
 
233 233
         return $query;
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             ConfigHelper::getConfigFromFile(self::configFilePath()),
396 396
             [
397 397
                 'sourceId' => $sourceModel->id,
398
-                'sourceName' => (string)$sourceModel->name,
398
+                'sourceName' => (string) $sourceModel->name,
399 399
                 'sourceHandle' => $sourceModel->handle,
400 400
                 'sourceType' => $sourceModel->type,
401 401
             ]
Please login to merge, or discard this patch.
src/seoelements/SeoCategory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         Event::on(
107 107
             Categories::class,
108 108
             Categories::EVENT_AFTER_SAVE_GROUP,
109
-            function (CategoryGroupEvent $event) {
109
+            function(CategoryGroupEvent $event) {
110 110
                 Craft::debug(
111 111
                     'Categories::EVENT_AFTER_SAVE_GROUP',
112 112
                     __METHOD__
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         Event::on(
118 118
             Categories::class,
119 119
             Categories::EVENT_AFTER_DELETE_GROUP,
120
-            function (CategoryGroupEvent $event) {
120
+            function(CategoryGroupEvent $event) {
121 121
                 Craft::debug(
122 122
                     'Categories::EVENT_AFTER_DELETE_GROUP',
123 123
                     __METHOD__
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             Event::on(
133 133
                 Categories::class,
134 134
                 Categories::EVENT_AFTER_SAVE_GROUP,
135
-                function (CategoryGroupEvent $event) {
135
+                function(CategoryGroupEvent $event) {
136 136
                     Craft::debug(
137 137
                         'Categories::EVENT_AFTER_SAVE_GROUP',
138 138
                         __METHOD__
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             Event::on(
156 156
                 Categories::class,
157 157
                 Categories::EVENT_AFTER_DELETE_GROUP,
158
-                function (CategoryGroupEvent $event) {
158
+                function(CategoryGroupEvent $event) {
159 159
                     Craft::debug(
160 160
                         'Categories::EVENT_AFTER_DELETE_GROUP',
161 161
                         __METHOD__
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         Event::on(
185 185
             Category::class,
186 186
             Category::EVENT_DEFINE_SIDEBAR_HTML,
187
-            static function (DefineHtmlEvent $event) {
187
+            static function(DefineHtmlEvent $event) {
188 188
                 Craft::debug(
189 189
                     'Category::EVENT_DEFINE_SIDEBAR_HTML',
190 190
                     __METHOD__
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             ->siteId($metaBundle->sourceSiteId)
225 225
             ->limit($metaBundle->metaSitemapVars->sitemapLimit);
226 226
         if (!empty($metaBundle->metaSitemapVars->structureDepth)) {
227
-            $query->level('<=' . $metaBundle->metaSitemapVars->structureDepth);
227
+            $query->level('<='.$metaBundle->metaSitemapVars->structureDepth);
228 228
         }
229 229
 
230 230
         return $query;
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             ConfigHelper::getConfigFromFile(self::configFilePath()),
382 382
             [
383 383
                 'sourceId' => $sourceModel->id,
384
-                'sourceName' => (string)$sourceModel->name,
384
+                'sourceName' => (string) $sourceModel->name,
385 385
                 'sourceHandle' => $sourceModel->handle,
386 386
             ]
387 387
         );
Please login to merge, or discard this patch.
src/Seomatic.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             $lastSegment = end($segments);
342 342
             $site = Craft::$app->getSites()->getSiteByHandle($lastSegment);
343 343
             if ($site !== null) {
344
-                $siteSuffix = '/' . $lastSegment;
344
+                $siteSuffix = '/'.$lastSegment;
345 345
             }
346 346
         }
347 347
         $currentUser = Craft::$app->getUser()->getIdentity();
@@ -349,31 +349,31 @@  discard block
 block discarded – undo
349 349
         if ($currentUser->can('seomatic:dashboard')) {
350 350
             $subNavs['dashboard'] = [
351 351
                 'label' => Craft::t('seomatic', 'Dashboard'),
352
-                'url' => 'seomatic/dashboard' . $siteSuffix,
352
+                'url' => 'seomatic/dashboard'.$siteSuffix,
353 353
             ];
354 354
         }
355 355
         if ($currentUser->can('seomatic:global-meta')) {
356 356
             $subNavs['global'] = [
357 357
                 'label' => Craft::t('seomatic', 'Global SEO'),
358
-                'url' => 'seomatic/global/general' . $siteSuffix,
358
+                'url' => 'seomatic/global/general'.$siteSuffix,
359 359
             ];
360 360
         }
361 361
         if ($currentUser->can('seomatic:content-meta')) {
362 362
             $subNavs['content'] = [
363 363
                 'label' => Craft::t('seomatic', 'Content SEO'),
364
-                'url' => 'seomatic/content' . $siteSuffix,
364
+                'url' => 'seomatic/content'.$siteSuffix,
365 365
             ];
366 366
         }
367 367
         if ($currentUser->can('seomatic:site-settings')) {
368 368
             $subNavs['site'] = [
369 369
                 'label' => Craft::t('seomatic', 'Site Settings'),
370
-                'url' => 'seomatic/site/identity' . $siteSuffix,
370
+                'url' => 'seomatic/site/identity'.$siteSuffix,
371 371
             ];
372 372
         }
373 373
         if ($currentUser->can('seomatic:tracking-scripts')) {
374 374
             $subNavs['tracking'] = [
375 375
                 'label' => Craft::t('seomatic', 'Tracking Scripts'),
376
-                'url' => 'seomatic/tracking/gtag' . $siteSuffix,
376
+                'url' => 'seomatic/tracking/gtag'.$siteSuffix,
377 377
             ];
378 378
         }
379 379
         $editableSettings = true;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         Event::on(
419 419
             Plugins::class,
420 420
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
421
-            function (PluginEvent $event) {
421
+            function(PluginEvent $event) {
422 422
                 if ($event->plugin === $this) {
423 423
                     // Invalidate our caches after we've been installed
424 424
                     $this->clearAllCaches();
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
         Event::on(
440 440
             ClearCaches::class,
441 441
             ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
442
-            function (RegisterCacheOptionsEvent $event) {
442
+            function(RegisterCacheOptionsEvent $event) {
443 443
                 Craft::debug(
444 444
                     'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS',
445 445
                     __METHOD__
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         Event::on(
456 456
             Plugins::class,
457 457
             Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS,
458
-            function (PluginEvent $event) {
458
+            function(PluginEvent $event) {
459 459
                 if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) {
460 460
                     // For all the emojis
461 461
                     $settingsModel = $this->getSettings();
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         Event::on(
486 486
             Plugins::class,
487 487
             Plugins::EVENT_AFTER_LOAD_PLUGINS,
488
-            function () {
488
+            function() {
489 489
                 // Delay registering SEO Elements to give other plugins a chance to load first
490 490
                 $this->seoElements->getAllSeoElementTypes(false);
491 491
                 // Delay installing GQL handlers to give other plugins a chance to register their own first
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         Event::on(
507 507
             Fields::class,
508 508
             Fields::EVENT_REGISTER_FIELD_TYPES,
509
-            static function (RegisterComponentTypesEvent $event) {
509
+            static function(RegisterComponentTypesEvent $event) {
510 510
                 $event->types[] = SeoSettingsField::class;
511 511
                 $event->types[] = Seomatic_MetaField::class;
512 512
             }
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         Event::on(
516 516
             Elements::class,
517 517
             Elements::EVENT_AFTER_SAVE_ELEMENT,
518
-            static function (ElementEvent $event) {
518
+            static function(ElementEvent $event) {
519 519
                 Craft::debug(
520 520
                     'Elements::EVENT_AFTER_SAVE_ELEMENT',
521 521
                     __METHOD__
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
         Event::on(
536 536
             Elements::class,
537 537
             Elements::EVENT_AFTER_DELETE_ELEMENT,
538
-            static function (ElementEvent $event) {
538
+            static function(ElementEvent $event) {
539 539
                 Craft::debug(
540 540
                     'Elements::EVENT_AFTER_DELETE_ELEMENT',
541 541
                     __METHOD__
@@ -554,19 +554,19 @@  discard block
 block discarded – undo
554 554
             Event::on(
555 555
                 Entry::class,
556 556
                 Element::EVENT_REGISTER_PREVIEW_TARGETS,
557
-                static function (RegisterPreviewTargetsEvent $e) {
557
+                static function(RegisterPreviewTargetsEvent $e) {
558 558
                     /** @var Element $element */
559 559
                     $element = $e->sender;
560 560
                     if ($element->uri !== null) {
561 561
                         $e->previewTargets[] = [
562
-                            'label' => '
Please login to merge, or discard this patch.