Passed
Push — develop-v4 ( 2d4983...bb740f )
by Andrew
23:04
created
src/debug/panels/SeomaticPanel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         Event::on(MetaContainers::class,
48 48
             MetaContainers::EVENT_METABUNDLE_DEBUG_DATA,
49
-            function (MetaBundleDebugDataEvent $e) {
49
+            function(MetaBundleDebugDataEvent $e) {
50 50
                 if ($e->metaBundle) {
51 51
                     $this->metaBundles[$e->metaBundleCategory] = $e->metaBundle;
52 52
                 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getSummary(): string
69 69
     {
70
-        return Craft::$app->getView()->render($this->viewPath . 'summary', ['panel' => $this]);
70
+        return Craft::$app->getView()->render($this->viewPath.'summary', ['panel' => $this]);
71 71
     }
72 72
 
73 73
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function getDetail(): string
77 77
     {
78
-        return Craft::$app->getView()->render($this->viewPath . 'detail', ['panel' => $this]);
78
+        return Craft::$app->getView()->render($this->viewPath.'detail', ['panel' => $this]);
79 79
     }
80 80
 
81 81
     /**
Please login to merge, or discard this patch.
src/debug/views/seomatic/detail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
                     $content .= $this->render('rendered-tags', [
165 165
                         'values' => [
166 166
                             'renderedTags' => $panel->data[$metaBundleCategory]['renderedTags'][$metaContainerName] ?? [],
167
-                            'id' => $sectionName . '-' . $metaBundleCategory . '-' . $metaContainerName . '-rendered-tags',
167
+                            'id' => $sectionName.'-'.$metaBundleCategory.'-'.$metaContainerName.'-rendered-tags',
168 168
                             'view' => $this,
169 169
                             'language' => $editorLanguage,
170 170
                         ]
Please login to merge, or discard this patch.
src/models/MetaTag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $className = MetaTag::class;
80 80
         if ($tagType) {
81 81
             // Potentially load a sub-type of MetaTag
82
-            $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\' . ucfirst($tagType) . 'Tag';
82
+            $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\'.ucfirst($tagType).'Tag';
83 83
             /** @var $model MetaTag */
84 84
             if (class_exists($tagClassName)) {
85 85
                 $className = $tagClassName;
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
                 if (Seomatic::$devMode) {
156 156
                     $error = Craft::t(
157 157
                         'seomatic',
158
-                        '{tagtype} tag `{key}` did not render because it is missing attributes. ' . print_r($data, true),
158
+                        '{tagtype} tag `{key}` did not render because it is missing attributes. '.print_r($data, true),
159 159
                         ['tagtype' => 'Meta', 'key' => $this->key]
160 160
                     );
161
-                    Craft::info('WARNING - ' . $error, __METHOD__);
161
+                    Craft::info('WARNING - '.$error, __METHOD__);
162 162
                 }
163 163
                 $shouldRender = false;
164 164
             }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         foreach ($configs as $config) {
183 183
             if ($this->prepForRender($config)) {
184 184
                 ksort($config);
185
-                $html .= Html::tag('meta', '', $config) . $linebreak;
185
+                $html .= Html::tag('meta', '', $config).$linebreak;
186 186
             }
187 187
         }
188 188
 
Please login to merge, or discard this patch.
src/models/MetaLink.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $className = MetaLink::class;
86 86
         if ($tagType) {
87 87
             // Potentially load a sub-type of MetaTag
88
-            $tagClassName = 'nystudio107\\seomatic\\models\\metalink\\' . ucfirst($tagType) . 'Link';
88
+            $tagClassName = 'nystudio107\\seomatic\\models\\metalink\\'.ucfirst($tagType).'Link';
89 89
             /** @var $model MetaLink */
90 90
             if (class_exists($tagClassName)) {
91 91
                 $className = $tagClassName;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                         '{tagtype} tag `{key}` did not render because it is missing attributes.',
183 183
                         ['tagtype' => 'Link', 'key' => $this->key]
184 184
                     );
185
-                    Craft::info('WARNING - ' . $error, __METHOD__);
185
+                    Craft::info('WARNING - '.$error, __METHOD__);
186 186
                 }
187 187
                 $shouldRender = false;
188 188
             }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         foreach ($configs as $config) {
207 207
             if ($this->prepForRender($config)) {
208 208
                 ksort($config);
209
-                $html .= Html::tag('link', '', $config) . $linebreak;
209
+                $html .= Html::tag('link', '', $config).$linebreak;
210 210
             }
211 211
         }
212 212
 
Please login to merge, or discard this patch.
src/models/MetaJsonLd.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     public static function create($schemaType, array $config = []): MetaJsonLd
120 120
     {
121 121
         // Try the passed in $schemaType
122
-        $className = self::SCHEMA_NAMESPACE_PREFIX . $schemaType;
122
+        $className = self::SCHEMA_NAMESPACE_PREFIX.$schemaType;
123 123
         /** @var $model MetaJsonLd */
124 124
         if (class_exists($className)) {
125 125
             self::cleanProperties($className, $config);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             return new $className($config);
128 128
         }
129 129
         // Try the prefixed $schemaType
130
-        $className = self::SCHEMA_NAMESPACE_PREFIX . self::SCHEMA_NAME_PREFIX . $schemaType;
130
+        $className = self::SCHEMA_NAMESPACE_PREFIX.self::SCHEMA_NAME_PREFIX.$schemaType;
131 131
         /** @var $model MetaJsonLd */
132 132
         if (class_exists($className)) {
133 133
             self::cleanProperties($className, $config);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
             foreach ($dataToValidate as $key => $data) {
386 386
                 /** @var array $expectedTypes */
387 387
                 foreach ($expectedTypes as $expectedType) {
388
-                    $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $expectedType;
388
+                    $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$expectedType;
389 389
                     switch ($expectedType) {
390 390
                         // Text always validates
391 391
                         case 'Text':
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
                         case 'Date':
426 426
                             $validator = new DateValidator;
427 427
                             $validator->type = DateValidator::TYPE_DATE;
428
-                            $validator->format = 'php:' . DateTime::ATOM;
428
+                            $validator->format = 'php:'.DateTime::ATOM;
429 429
                             if ($validator->validate($data, $error)) {
430 430
                                 $validated = true;
431 431
                             }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                                 $validated = true;
472 472
                             }
473 473
                             if (is_string($data)) {
474
-                                $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\' . $data;
474
+                                $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\'.$data;
475 475
                                 if (class_exists($targetClass)) {
476 476
                                     $validated = true;
477 477
                                 }
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                     }
481 481
                 }
482 482
                 if (!$validated) {
483
-                    $this->addError($attribute, 'Must be one of these types: ' . implode(', ', $expectedTypes));
483
+                    $this->addError($attribute, 'Must be one of these types: '.implode(', ', $expectedTypes));
484 484
                 }
485 485
             }
486 486
         }
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
@@ -51,16 +51,16 @@
 block discarded – undo
51 51
     public function includeMetaData($dependency)
52 52
     {
53 53
         Craft::beginProfile('MetaJsonLdContainer::includeMetaData', __METHOD__);
54
-        $uniqueKey = $this->handle . $dependency->tags[3] . '-v2';
54
+        $uniqueKey = $this->handle.$dependency->tags[3].'-v2';
55 55
         $cache = Craft::$app->getCache();
56 56
         if ($this->clearCache) {
57 57
             TagDependency::invalidate($cache, $dependency->tags[3]);
58 58
         }
59 59
         [$jsonLd, $attrs] = $cache->getOrSet(
60
-            self::CONTAINER_TYPE . $uniqueKey,
61
-            function () use ($uniqueKey) {
60
+            self::CONTAINER_TYPE.$uniqueKey,
61
+            function() use ($uniqueKey) {
62 62
                 Craft::info(
63
-                    self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey,
63
+                    self::CONTAINER_TYPE.' cache miss: '.$uniqueKey,
64 64
                     __METHOD__
65 65
                 );
66 66
 
Please login to merge, or discard this patch.
src/models/MetaScriptContainer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
     public function includeMetaData($dependency)
56 56
     {
57 57
         Craft::beginProfile('MetaScriptContainer::includeMetaData', __METHOD__);
58
-        $uniqueKey = $this->handle . $dependency->tags[3] . $this->dataLayerHash();
58
+        $uniqueKey = $this->handle.$dependency->tags[3].$this->dataLayerHash();
59 59
         $cache = Craft::$app->getCache();
60 60
         if ($this->clearCache) {
61 61
             TagDependency::invalidate($cache, $dependency->tags[3]);
62 62
         }
63 63
         $tagData = $cache->getOrSet(
64
-            self::CONTAINER_TYPE . $uniqueKey,
65
-            function () use ($uniqueKey) {
64
+            self::CONTAINER_TYPE.$uniqueKey,
65
+            function() use ($uniqueKey) {
66 66
                 Craft::info(
67
-                    self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey,
67
+                    self::CONTAINER_TYPE.' cache miss: '.$uniqueKey,
68 68
                     __METHOD__
69 69
                 );
70 70
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     'jQuery(window).load()',
141 141
                 ];
142 142
                 $position = $positionNames[$config['position'] - 1] ?? 'unknown';
143
-                $html .= "<!-- Position: {$position} -->" . PHP_EOL;
143
+                $html .= "<!-- Position: {$position} -->".PHP_EOL;
144 144
             }
145 145
             if ($bodyJs || !$params['renderScriptTags']) {
146 146
                 $html .= $config['js'];
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
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             $lastSegment = end($segments);
346 346
             $site = Craft::$app->getSites()->getSiteByHandle($lastSegment);
347 347
             if ($site !== null) {
348
-                $siteSuffix = '/' . $lastSegment;
348
+                $siteSuffix = '/'.$lastSegment;
349 349
             }
350 350
         }
351 351
         $currentUser = Craft::$app->getUser()->getIdentity();
@@ -353,31 +353,31 @@  discard block
 block discarded – undo
353 353
         if ($currentUser->can('seomatic:dashboard')) {
354 354
             $subNavs['dashboard'] = [
355 355
                 'label' => Craft::t('seomatic', 'Dashboard'),
356
-                'url' => 'seomatic/dashboard' . $siteSuffix,
356
+                'url' => 'seomatic/dashboard'.$siteSuffix,
357 357
             ];
358 358
         }
359 359
         if ($currentUser->can('seomatic:global-meta')) {
360 360
             $subNavs['global'] = [
361 361
                 'label' => Craft::t('seomatic', 'Global SEO'),
362
-                'url' => 'seomatic/global/general' . $siteSuffix,
362
+                'url' => 'seomatic/global/general'.$siteSuffix,
363 363
             ];
364 364
         }
365 365
         if ($currentUser->can('seomatic:content-meta')) {
366 366
             $subNavs['content'] = [
367 367
                 'label' => Craft::t('seomatic', 'Content SEO'),
368
-                'url' => 'seomatic/content' . $siteSuffix,
368
+                'url' => 'seomatic/content'.$siteSuffix,
369 369
             ];
370 370
         }
371 371
         if ($currentUser->can('seomatic:site-settings')) {
372 372
             $subNavs['site'] = [
373 373
                 'label' => Craft::t('seomatic', 'Site Settings'),
374
-                'url' => 'seomatic/site/identity' . $siteSuffix,
374
+                'url' => 'seomatic/site/identity'.$siteSuffix,
375 375
             ];
376 376
         }
377 377
         if ($currentUser->can('seomatic:tracking-scripts')) {
378 378
             $subNavs['tracking'] = [
379 379
                 'label' => Craft::t('seomatic', 'Tracking Scripts'),
380
-                'url' => 'seomatic/tracking/gtag' . $siteSuffix,
380
+                'url' => 'seomatic/tracking/gtag'.$siteSuffix,
381 381
             ];
382 382
         }
383 383
         $editableSettings = true;
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         Event::on(
423 423
             Plugins::class,
424 424
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
425
-            function (PluginEvent $event) {
425
+            function(PluginEvent $event) {
426 426
                 if ($event->plugin === $this) {
427 427
                     // Invalidate our caches after we've been installed
428 428
                     $this->clearAllCaches();
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         Event::on(
444 444
             ClearCaches::class,
445 445
             ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
446
-            function (RegisterCacheOptionsEvent $event) {
446
+            function(RegisterCacheOptionsEvent $event) {
447 447
                 Craft::debug(
448 448
                     'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS',
449 449
                     __METHOD__
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         Event::on(
460 460
             Plugins::class,
461 461
             Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS,
462
-            function (PluginEvent $event) {
462
+            function(PluginEvent $event) {
463 463
                 if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) {
464 464
                     // For all the emojis
465 465
                     $settingsModel = $this->getSettings();
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
         Event::on(
490 490
             Plugins::class,
491 491
             Plugins::EVENT_AFTER_LOAD_PLUGINS,
492
-            function () {
492
+            function() {
493 493
                 // Delay registering SEO Elements to give other plugins a chance to load first
494 494
                 $this->seoElements->getAllSeoElementTypes(false);
495 495
                 // Delay installing GQL handlers to give other plugins a chance to register their own first
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
         Event::on(
511 511
             Fields::class,
512 512
             Fields::EVENT_REGISTER_FIELD_TYPES,
513
-            static function (RegisterComponentTypesEvent $event) {
513
+            static function(RegisterComponentTypesEvent $event) {
514 514
                 $event->types[] = SeoSettingsField::class;
515 515
                 $event->types[] = Seomatic_MetaField::class;
516 516
             }
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
         Event::on(
520 520
             Elements::class,
521 521
             Elements::EVENT_AFTER_SAVE_ELEMENT,
522
-            static function (ElementEvent $event) {
522
+            static function(ElementEvent $event) {
523 523
                 Craft::debug(
524 524
                     'Elements::EVENT_AFTER_SAVE_ELEMENT',
525 525
                     __METHOD__
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         Event::on(
540 540
             Elements::class,
541 541
             Elements::EVENT_AFTER_DELETE_ELEMENT,
542
-            static function (ElementEvent $event) {
542
+            static function(ElementEvent $event) {
543 543
                 Craft::debug(
544 544
                     'Elements::EVENT_AFTER_DELETE_ELEMENT',
545 545
                     __METHOD__
@@ -558,19 +558,19 @@  discard block
 block discarded – undo
558 558
             Event::on(
559 559
                 Entry::class,
560 560
                 Element::EVENT_REGISTER_PREVIEW_TARGETS,
561
-                static function (RegisterPreviewTargetsEvent $e) {
561
+                static function(RegisterPreviewTargetsEvent $e) {
562 562
                     /** @var Element $element */
563 563
                     $element = $e->sender;
564 564
                     if ($element->uri !== null) {
565 565
                         $e->previewTargets[] = [
566
-                            'label' => '
Please login to merge, or discard this patch.