Passed
Push — develop-v4 ( d0153d...1742ce )
by Andrew
31:41 queued 01:12
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/services/Sitemaps.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     // Constants
43 43
     // =========================================================================
44 44
 
45
-    const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapIndexTemplate::TEMPLATE_TYPE;
45
+    const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapIndexTemplate::TEMPLATE_TYPE;
46 46
 
47
-    const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapTemplate::TEMPLATE_TYPE;
47
+    const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapTemplate::TEMPLATE_TYPE;
48 48
 
49
-    const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapCustomTemplate::TEMPLATE_TYPE;
49
+    const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapCustomTemplate::TEMPLATE_TYPE;
50 50
 
51 51
     const SEARCH_ENGINE_SUBMISSION_URLS = [
52 52
     ];
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             Event::on(
91 91
                 UrlManager::class,
92 92
                 UrlManager::EVENT_REGISTER_SITE_URL_RULES,
93
-                function (RegisterUrlRulesEvent $event) {
93
+                function(RegisterUrlRulesEvent $event) {
94 94
                     Craft::debug(
95 95
                         'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
96 96
                         __METHOD__
@@ -243,19 +243,19 @@  discard block
 block discarded – undo
243 243
                         $siteId = $groupSiteIds[0];
244 244
                         $sitemapIndexUrl = $this->sitemapIndexUrlForSiteId($siteId);
245 245
                         if (!empty($sitemapIndexUrl)) {
246
-                            $submissionUrl = $url . urlencode($sitemapIndexUrl);
246
+                            $submissionUrl = $url.urlencode($sitemapIndexUrl);
247 247
                             // create new guzzle client
248 248
                             $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]);
249 249
                             // Submit the sitemap index to each search engine
250 250
                             try {
251 251
                                 $guzzleClient->post($submissionUrl);
252 252
                                 Craft::info(
253
-                                    'Sitemap index submitted to: ' . $submissionUrl,
253
+                                    'Sitemap index submitted to: '.$submissionUrl,
254 254
                                     __METHOD__
255 255
                                 );
256 256
                             } catch (\Exception $e) {
257 257
                                 Craft::error(
258
-                                    'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(),
258
+                                    'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(),
259 259
                                     __METHOD__
260 260
                                 );
261 261
                             }
@@ -315,19 +315,19 @@  discard block
 block discarded – undo
315 315
             foreach ($searchEngineUrls as &$url) {
316 316
                 $sitemapUrl = $this->sitemapUrlForBundle($sourceBundleType, $sourceHandle, $sourceSiteId);
317 317
                 if (!empty($sitemapUrl)) {
318
-                    $submissionUrl = $url . urlencode($sitemapUrl);
318
+                    $submissionUrl = $url.urlencode($sitemapUrl);
319 319
                     // create new guzzle client
320 320
                     $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]);
321 321
                     // Submit the sitemap index to each search engine
322 322
                     try {
323 323
                         $guzzleClient->post($submissionUrl);
324 324
                         Craft::info(
325
-                            'Sitemap index submitted to: ' . $submissionUrl,
325
+                            'Sitemap index submitted to: '.$submissionUrl,
326 326
                             __METHOD__
327 327
                         );
328 328
                     } catch (\Exception $e) {
329 329
                         Craft::error(
330
-                            'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(),
330
+                            'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(),
331 331
                             __METHOD__
332 332
                         );
333 333
                     }
@@ -393,19 +393,19 @@  discard block
 block discarded – undo
393 393
             foreach ($searchEngineUrls as &$url) {
394 394
                 $sitemapUrl = $this->sitemapCustomUrlForSiteId($siteId);
395 395
                 if (!empty($sitemapUrl)) {
396
-                    $submissionUrl = $url . urlencode($sitemapUrl);
396
+                    $submissionUrl = $url.urlencode($sitemapUrl);
397 397
                     // create new guzzle client
398 398
                     $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]);
399 399
                     // Submit the sitemap index to each search engine
400 400
                     try {
401 401
                         $guzzleClient->post($submissionUrl);
402 402
                         Craft::info(
403
-                            'Sitemap Custom submitted to: ' . $submissionUrl,
403
+                            'Sitemap Custom submitted to: '.$submissionUrl,
404 404
                             __METHOD__
405 405
                         );
406 406
                     } catch (\Exception $e) {
407 407
                         Craft::error(
408
-                            'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(),
408
+                            'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(),
409 409
                             __METHOD__
410 410
                         );
411 411
                     }
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
         }
484 484
 
485 485
         foreach ($sites as $site) {
486
-            $result .= 'sitemap: ' . $this->sitemapIndexUrlForSiteId($site->id) . PHP_EOL;
486
+            $result .= 'sitemap: '.$this->sitemapIndexUrlForSiteId($site->id).PHP_EOL;
487 487
         }
488 488
 
489 489
         return rtrim($result, PHP_EOL);
@@ -515,9 +515,9 @@  discard block
 block discarded – undo
515 515
         // Since we want a stale-while-revalidate pattern, only invalidate the cache if we're asked to
516 516
         if ($invalidateCache) {
517 517
             $cache = Craft::$app->getCache();
518
-            TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG . $handle . $siteId);
518
+            TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG.$handle.$siteId);
519 519
             Craft::info(
520
-                'Sitemap cache cleared: ' . $handle,
520
+                'Sitemap cache cleared: '.$handle,
521 521
                 __METHOD__
522 522
             );
523 523
         }
Please login to merge, or discard this patch.
src/models/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
      *     'default' => 'http://example.com/',
209 209
      *     'spanish' => 'http://example.com/es/',
210 210
      * ],     */
211
-    public string|array $siteUrlOverride = '';
211
+    public string | array $siteUrlOverride = '';
212 212
 
213 213
     /**
214 214
      * @var int
Please login to merge, or discard this patch.