Passed
Push — v4 ( 53a2b4...f1d7a8 )
by Andrew
44:05 queued 19:41
created
src/seomatic-config/entrymeta/TagContainer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,44 +19,44 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 return [
22
-    MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [
22
+    MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [
23 23
         'name' => 'General',
24 24
         'description' => 'General Meta Tags',
25 25
         'handle' => TagService::GENERAL_HANDLE,
26
-        'class' => (string)MetaTagContainer::class,
26
+        'class' => (string) MetaTagContainer::class,
27 27
         'include' => true,
28 28
         'dependencies' => [
29 29
         ],
30 30
         'data' => [
31 31
         ],
32 32
     ],
33
-    MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [
33
+    MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [
34 34
         'name' => 'Facebook',
35 35
         'description' => 'Facebook OpenGraph Meta Tags',
36 36
         'handle' => TagService::FACEBOOK_HANDLE,
37
-        'class' => (string)MetaTagContainer::class,
37
+        'class' => (string) MetaTagContainer::class,
38 38
         'include' => true,
39 39
         'dependencies' => [
40 40
         ],
41 41
         'data' => [
42 42
         ],
43 43
     ],
44
-    MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [
44
+    MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [
45 45
         'name' => 'Twitter',
46 46
         'description' => 'Twitter Card Meta Tags',
47 47
         'handle' => TagService::TWITTER_HANDLE,
48
-        'class' => (string)MetaTagContainer::class,
48
+        'class' => (string) MetaTagContainer::class,
49 49
         'include' => true,
50 50
         'dependencies' => [
51 51
         ],
52 52
         'data' => [
53 53
         ],
54 54
     ],
55
-    MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [
55
+    MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [
56 56
         'name' => 'Miscellaneous',
57 57
         'description' => 'Miscellaneous Meta Tags',
58 58
         'handle' => TagService::MISC_HANDLE,
59
-        'class' => (string)MetaTagContainer::class,
59
+        'class' => (string) MetaTagContainer::class,
60 60
         'include' => true,
61 61
         'dependencies' => [
62 62
         ],
Please login to merge, or discard this patch.
src/seomatic-config/digitalproductmeta/TagContainer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,44 +19,44 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 return [
22
-    MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [
22
+    MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [
23 23
         'name' => 'General',
24 24
         'description' => 'General Meta Tags',
25 25
         'handle' => TagService::GENERAL_HANDLE,
26
-        'class' => (string)MetaTagContainer::class,
26
+        'class' => (string) MetaTagContainer::class,
27 27
         'include' => true,
28 28
         'dependencies' => [
29 29
         ],
30 30
         'data' => [
31 31
         ],
32 32
     ],
33
-    MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [
33
+    MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [
34 34
         'name' => 'Facebook',
35 35
         'description' => 'Facebook OpenGraph Meta Tags',
36 36
         'handle' => TagService::FACEBOOK_HANDLE,
37
-        'class' => (string)MetaTagContainer::class,
37
+        'class' => (string) MetaTagContainer::class,
38 38
         'include' => true,
39 39
         'dependencies' => [
40 40
         ],
41 41
         'data' => [
42 42
         ],
43 43
     ],
44
-    MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [
44
+    MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [
45 45
         'name' => 'Twitter',
46 46
         'description' => 'Twitter Card Meta Tags',
47 47
         'handle' => TagService::TWITTER_HANDLE,
48
-        'class' => (string)MetaTagContainer::class,
48
+        'class' => (string) MetaTagContainer::class,
49 49
         'include' => true,
50 50
         'dependencies' => [
51 51
         ],
52 52
         'data' => [
53 53
         ],
54 54
     ],
55
-    MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [
55
+    MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [
56 56
         'name' => 'Miscellaneous',
57 57
         'description' => 'Miscellaneous Meta Tags',
58 58
         'handle' => TagService::MISC_HANDLE,
59
-        'class' => (string)MetaTagContainer::class,
59
+        'class' => (string) MetaTagContainer::class,
60 60
         'include' => true,
61 61
         'dependencies' => [
62 62
         ],
Please login to merge, or discard this patch.
src/services/FrontendTemplates.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     // Constants
34 34
     // =========================================================================
35 35
 
36
-    public const FRONTENDTEMPLATES_CONTAINER = Seomatic::SEOMATIC_HANDLE . EditableTemplate::TEMPLATE_TYPE;
36
+    public const FRONTENDTEMPLATES_CONTAINER = Seomatic::SEOMATIC_HANDLE.EditableTemplate::TEMPLATE_TYPE;
37 37
 
38 38
     public const HUMANS_TXT_HANDLE = 'humans';
39 39
     public const ROBOTS_TXT_HANDLE = 'robots';
@@ -171,16 +171,16 @@  discard block
 block discarded – undo
171 171
         $dependency = new TagDependency([
172 172
             'tags' => [
173 173
                 self::GLOBAL_FRONTENDTEMPLATE_CACHE_TAG,
174
-                self::FRONTENDTEMPLATE_CACHE_TAG . $template,
175
-                self::FRONTENDTEMPLATE_CACHE_TAG . $template . $siteId,
174
+                self::FRONTENDTEMPLATE_CACHE_TAG.$template,
175
+                self::FRONTENDTEMPLATE_CACHE_TAG.$template.$siteId,
176 176
             ],
177 177
         ]);
178 178
         $cache = Craft::$app->getCache();
179 179
         $html = $cache->getOrSet(
180
-            self::CACHE_KEY . $template . $siteId,
180
+            self::CACHE_KEY.$template.$siteId,
181 181
             function() use ($template, $params) {
182 182
                 Craft::info(
183
-                    'Frontend template cache miss: ' . $template,
183
+                    'Frontend template cache miss: '.$template,
184 184
                     __METHOD__
185 185
                 );
186 186
                 $html = '';
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
     public function invalidateFrontendTemplateCache(string $template)
252 252
     {
253 253
         $cache = Craft::$app->getCache();
254
-        TagDependency::invalidate($cache, self::FRONTENDTEMPLATE_CACHE_TAG . $template);
254
+        TagDependency::invalidate($cache, self::FRONTENDTEMPLATE_CACHE_TAG.$template);
255 255
         Craft::info(
256
-            'Frontend template cache cleared: ' . $template,
256
+            'Frontend template cache cleared: '.$template,
257 257
             __METHOD__
258 258
         );
259 259
     }
Please login to merge, or discard this patch.
src/seoelements/SeoCategory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             ->siteId($metaBundle->sourceSiteId)
224 224
             ->limit($metaBundle->metaSitemapVars->sitemapLimit);
225 225
         if (!empty($metaBundle->metaSitemapVars->structureDepth)) {
226
-            $query->level('<=' . $metaBundle->metaSitemapVars->structureDepth);
226
+            $query->level('<='.$metaBundle->metaSitemapVars->structureDepth);
227 227
         }
228 228
 
229 229
         return $query;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             ConfigHelper::getConfigFromFile(self::configFilePath()),
380 380
             [
381 381
                 'sourceId' => $sourceModel->id,
382
-                'sourceName' => (string)$sourceModel->name,
382
+                'sourceName' => (string) $sourceModel->name,
383 383
                 'sourceHandle' => $sourceModel->handle,
384 384
             ]
385 385
         );
Please login to merge, or discard this patch.
src/seoelements/SeoEntry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             ConfigHelper::getConfigFromFile(self::configFilePath()),
395 395
             [
396 396
                 'sourceId' => $sourceModel->id,
397
-                'sourceName' => (string)$sourceModel->name,
397
+                'sourceName' => (string) $sourceModel->name,
398 398
                 'sourceHandle' => $sourceModel->handle,
399 399
                 'sourceType' => $sourceModel->type,
400 400
             ]
Please login to merge, or discard this patch.
src/seoelements/SeoProduct.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@
 block discarded – undo
388 388
             ConfigHelper::getConfigFromFile(self::configFilePath()),
389 389
             [
390 390
                 'sourceId' => $sourceModel->id,
391
-                'sourceName' => (string)$sourceModel->name,
391
+                'sourceName' => (string) $sourceModel->name,
392 392
                 'sourceHandle' => $sourceModel->handle,
393 393
             ]
394 394
         );
Please login to merge, or discard this patch.
src/seoelements/SeoCampaign.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@
 block discarded – undo
388 388
             ConfigHelper::getConfigFromFile(self::configFilePath()),
389 389
             [
390 390
                 'sourceId' => $sourceModel->id,
391
-                'sourceName' => (string)$sourceModel->name,
391
+                'sourceName' => (string) $sourceModel->name,
392 392
                 'sourceHandle' => $sourceModel->handle,
393 393
             ]
394 394
         );
Please login to merge, or discard this patch.
src/controllers/SettingsController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -502,8 +502,8 @@
 block discarded – undo
502 502
         string $sourceBundleType,
503 503
         string $sourceHandle,
504 504
         string $siteHandle = null,
505
-               $typeId = null,
506
-               $loadFromSiteHandle = null,
505
+                $typeId = null,
506
+                $loadFromSiteHandle = null,
507 507
     ): Response {
508 508
         $variables = [];
509 509
         // @TODO: Let people choose an entry/categorygroup/product as the preview
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * @inheritdoc
89 89
      */
90
-    protected array|bool|int $allowAnonymous = [
90
+    protected array | bool | int $allowAnonymous = [
91 91
     ];
92 92
 
93 93
     // Public Methods
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $variables['pluginName'] = Seomatic::$settings->pluginName;
131 131
         $variables['title'] = $templateTitle;
132 132
         $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
133
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
133
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
134 134
         $variables['crumbs'] = [
135 135
             [
136 136
                 'label' => $pluginName,
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             ],
139 139
             [
140 140
                 'label' => $templateTitle,
141
-                'url' => UrlHelper::cpUrl('seomatic/dashboard' . $siteHandleUri),
141
+                'url' => UrlHelper::cpUrl('seomatic/dashboard'.$siteHandleUri),
142 142
             ],
143 143
         ];
144 144
         $variables['selectedSubnavItem'] = 'dashboard';
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
         foreach ($variables['metaBundles'] as $metaBundle) {
162 162
             $stat = 0;
163 163
             foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) {
164
-                $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]);
164
+                $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]);
165 165
                 $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0;
166 166
                 $variables['contentSetupChecklist'][$setupField] = [
167 167
                     'label' => $setupLabel,
168
-                    'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]),
168
+                    'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]),
169 169
                 ];
170 170
             }
171 171
             $stat = round($numGrades - (($stat * $numGrades) / $numFields));
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
         }
177 177
         // Global SEO grades
178 178
         Seomatic::$previewingMetaContainers = true;
179
-        $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId);
179
+        $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId);
180 180
         Seomatic::$previewingMetaContainers = false;
181 181
         if ($metaBundle !== null) {
182 182
             $stat = 0;
183 183
             $variables['globalSetupChecklist'] = [];
184 184
             foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) {
185
-                $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]);
185
+                $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]);
186 186
                 $variables['globalSetupChecklist'][$setupField] = [
187 187
                     'label' => $setupLabel,
188
-                    'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]),
188
+                    'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]),
189 189
                 ];
190 190
             }
191 191
             $stat = round(($stat / $numFields) * 100);
@@ -195,17 +195,17 @@  discard block
 block discarded – undo
195 195
             $stat = 0;
196 196
             $variables['siteSetupChecklist'] = [];
197 197
             foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) {
198
-                $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]);
198
+                $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]);
199 199
                 $variables['siteSetupChecklist'][$setupField] = [
200 200
                     'label' => $setupLabel,
201
-                    'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]),
201
+                    'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]),
202 202
                 ];
203 203
             }
204 204
             foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) {
205
-                $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]);
205
+                $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]);
206 206
                 $variables['siteSetupChecklist'][$setupField] = [
207 207
                     'label' => $setupLabel,
208
-                    'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]),
208
+                    'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]),
209 209
                 ];
210 210
             }
211 211
             $stat = round(($stat / $numFields) * 100);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         $variables['title'] = $templateTitle;
253 253
         $variables['subSectionTitle'] = $subSectionTitle;
254 254
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
255
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
255
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
256 256
         $variables['crumbs'] = [
257 257
             [
258 258
                 'label' => $pluginName,
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
             ],
261 261
             [
262 262
                 'label' => $templateTitle,
263
-                'url' => UrlHelper::cpUrl('seomatic/global/general' . $siteHandleUri),
263
+                'url' => UrlHelper::cpUrl('seomatic/global/general'.$siteHandleUri),
264 264
             ],
265 265
             [
266 266
                 'label' => $subSectionTitle,
267
-                'url' => UrlHelper::cpUrl('seomatic/global/' . $subSection . $siteHandleUri),
267
+                'url' => UrlHelper::cpUrl('seomatic/global/'.$subSection.$siteHandleUri),
268 268
             ],
269 269
         ];
270 270
         $variables['selectedSubnavItem'] = 'global';
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
         $this->setGlobalFieldSourceVariables($variables);
273 273
         // Enabled sites
274 274
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
275
-        $variables['controllerHandle'] = 'global' . '/' . $subSection;
275
+        $variables['controllerHandle'] = 'global'.'/'.$subSection;
276 276
         $variables['currentSubSection'] = $subSection;
277 277
         // Meta bundle settings
278 278
         Seomatic::$previewingMetaContainers = true;
279 279
         // Get the site to copy the settings from, if any
280 280
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
281 281
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
282
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
282
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
283 283
         // Load the metabundle
284 284
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
285 285
         if ($editedMetaBundle) {
@@ -333,11 +333,11 @@  discard block
 block discarded – undo
333 333
         // Preview the meta containers
334 334
         Seomatic::$plugin->metaContainers->previewMetaContainers(
335 335
             MetaBundles::GLOBAL_META_BUNDLE,
336
-            (int)$variables['currentSiteId']
336
+            (int) $variables['currentSiteId']
337 337
         );
338 338
 
339 339
         // Render the template
340
-        return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables);
340
+        return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables);
341 341
     }
342 342
 
343 343
     /**
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         $variables['pluginName'] = Seomatic::$settings->pluginName;
469 469
         $variables['title'] = $templateTitle;
470 470
         $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
471
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
471
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
472 472
         $variables['crumbs'] = [
473 473
             [
474 474
                 'label' => $pluginName,
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
             ],
477 477
             [
478 478
                 'label' => $templateTitle,
479
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
479
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
480 480
             ],
481 481
         ];
482 482
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         // Get the site to edit
517 517
         $siteId = $this->getSiteIdFromHandle($siteHandle);
518 518
         if (is_string($typeId)) {
519
-            $typeId = (int)$typeId;
519
+            $typeId = (int) $typeId;
520 520
         }
521 521
         // Get the (entry) type menu
522 522
         $typeMenu = [];
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             $currentType = reset($typeMenu);
531 531
             $variables['currentType'] = $typeMenu[$typeId] ?? $currentType;
532 532
             $variables['currentTypeId'] = $typeId ?? key($typeMenu);
533
-            $typeId = (int)$variables['currentTypeId'];
533
+            $typeId = (int) $variables['currentTypeId'];
534 534
         }
535 535
         $pluginName = Seomatic::$settings->pluginName;
536 536
         // Asset bundle
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
         // Get the site to copy the settings from, if any
552 552
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
553 553
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
554
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
554
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
555 555
         // Load the metabundle
556 556
         $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle(
557 557
             $sourceBundleType,
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
         $variables['title'] = $templateTitle;
578 578
         $variables['subSectionTitle'] = $subSectionTitle;
579 579
         $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}";
580
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
580
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
581 581
         $variables['siteHandleUri'] = $siteHandleUri;
582 582
         $variables['crumbs'] = [
583 583
             [
@@ -586,10 +586,10 @@  discard block
 block discarded – undo
586 586
             ],
587 587
             [
588 588
                 'label' => 'Content SEO',
589
-                'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri),
589
+                'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri),
590 590
             ],
591 591
             [
592
-                'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle,
592
+                'label' => $metaBundle->sourceName.' · '.$subSectionTitle,
593 593
                 'url' => UrlHelper::cpUrl("seomatic/edit-content/${subSection}/${sourceBundleType}/${sourceHandle}"),
594 594
             ],
595 595
         ];
@@ -619,13 +619,13 @@  discard block
 block discarded – undo
619 619
         // Preview the meta containers
620 620
         Seomatic::$plugin->metaContainers->previewMetaContainers(
621 621
             $uri,
622
-            (int)$variables['currentSiteId'],
622
+            (int) $variables['currentSiteId'],
623 623
             false,
624 624
             false
625 625
         );
626 626
 
627 627
         // Render the template
628
-        return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables);
628
+        return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables);
629 629
     }
630 630
 
631 631
     /**
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
         $bundleSettings = $request->getParam('metaBundleSettings');
646 646
         $sitemapSettings = $request->getParam('metaSitemapVars');
647 647
         if (is_string($typeId)) {
648
-            $typeId = (int)$typeId;
648
+            $typeId = (int) $typeId;
649 649
         }
650 650
         // Set the element type in the template
651 651
         $elementName = '';
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
         if ($subSection === 'social') {
711 711
             $subSectionSuffix = ' Media';
712 712
         }
713
-        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix);
713
+        $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix);
714 714
         // Asset bundle
715 715
         try {
716 716
             Seomatic::$view->registerAssetBundle(SeomaticAsset::class);
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         $variables['title'] = $templateTitle;
729 729
         $variables['subSectionTitle'] = $subSectionTitle;
730 730
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
731
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
731
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
732 732
         $variables['crumbs'] = [
733 733
             [
734 734
                 'label' => $pluginName,
@@ -736,11 +736,11 @@  discard block
 block discarded – undo
736 736
             ],
737 737
             [
738 738
                 'label' => $templateTitle,
739
-                'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri),
739
+                'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri),
740 740
             ],
741 741
             [
742 742
                 'label' => $subSectionTitle,
743
-                'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri),
743
+                'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri),
744 744
             ],
745 745
         ];
746 746
         $variables['selectedSubnavItem'] = 'site';
@@ -748,14 +748,14 @@  discard block
 block discarded – undo
748 748
 
749 749
         // Enabled sites
750 750
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
751
-        $variables['controllerHandle'] = 'site' . '/' . $subSection;
751
+        $variables['controllerHandle'] = 'site'.'/'.$subSection;
752 752
 
753 753
         // The site settings for the appropriate meta bundle
754 754
         Seomatic::$previewingMetaContainers = true;
755 755
         // Get the site to copy the settings from, if any
756 756
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
757 757
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
758
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
758
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
759 759
         // Load the metabundle
760 760
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
761 761
         Seomatic::$previewingMetaContainers = false;
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
         $variables['elementType'] = Asset::class;
774 774
 
775 775
         // Render the template
776
-        return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables);
776
+        return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables);
777 777
     }
778 778
 
779 779
     /**
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
         $siteId = $this->getSiteIdFromHandle($siteHandle);
903 903
         // Enabled sites
904 904
         $this->setMultiSiteVariables($siteHandle, $siteId, $variables);
905
-        $variables['controllerHandle'] = 'tracking' . '/' . $subSection;
905
+        $variables['controllerHandle'] = 'tracking'.'/'.$subSection;
906 906
         $variables['currentSubSection'] = $subSection;
907 907
 
908 908
         // The script meta containers for the global meta bundle
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
         // Get the site to copy the settings from, if any
911 911
         $variables['loadFromSiteHandle'] = $loadFromSiteHandle;
912 912
         $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle);
913
-        $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId;
913
+        $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId;
914 914
         // Load the metabundle
915 915
         $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad);
916 916
         if ($editedMetaBundle) {
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
         $variables['title'] = $templateTitle;
951 951
         $variables['subSectionTitle'] = $subSectionTitle;
952 952
         $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}";
953
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
953
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
954 954
         $variables['crumbs'] = [
955 955
             [
956 956
                 'label' => $pluginName,
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
             ],
963 963
             [
964 964
                 'label' => $subSectionTitle,
965
-                'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri),
965
+                'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri),
966 966
             ],
967 967
         ];
968 968
         $variables['selectedSubnavItem'] = 'tracking';
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
         if ($siteHandle !== null) {
1100 1100
             $site = Craft::$app->getSites()->getSiteByHandle($siteHandle);
1101 1101
             if (!$site) {
1102
-                throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle);
1102
+                throw new NotFoundHttpException('Invalid site handle: '.$siteHandle);
1103 1103
             }
1104 1104
             $siteId = $site->id;
1105 1105
         } else {
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
                 if (!empty($variables['enabledSiteIds'])) {
1137 1137
                     $siteId = reset($variables['enabledSiteIds']);
1138 1138
                 } else {
1139
-                    $this->requirePermission('editSite:' . $siteId);
1139
+                    $this->requirePermission('editSite:'.$siteId);
1140 1140
                 }
1141 1141
             }
1142 1142
         }
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
         if ($variables['showSites']) {
1157 1157
             $variables['sitesMenuLabel'] = Craft::t(
1158 1158
                 'site',
1159
-                $sites->getSiteById((int)$variables['currentSiteId'])->name
1159
+                $sites->getSiteById((int) $variables['currentSiteId'])->name
1160 1160
             );
1161 1161
         } else {
1162 1162
             $variables['sitesMenuLabel'] = '';
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         array  &$variables,
1222 1222
     ) {
1223 1223
         $variables['textFieldSources'] = array_merge(
1224
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'],
1224
+            ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'],
1225 1225
             FieldHelper::fieldsOfTypeFromSource(
1226 1226
                 $sourceBundleType,
1227 1227
                 $sourceHandle,
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
             )
1231 1231
         );
1232 1232
         $variables['assetFieldSources'] = array_merge(
1233
-            ['entryGroup' => ['optgroup' => $groupName . ' Fields']],
1233
+            ['entryGroup' => ['optgroup' => $groupName.' Fields']],
1234 1234
             FieldHelper::fieldsOfTypeFromSource(
1235 1235
                 $sourceBundleType,
1236 1236
                 $sourceHandle,
Please login to merge, or discard this patch.
src/controllers/ContentSeoController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         string $sort = 'sourceName|asc',
67 67
         int    $page = 1,
68 68
         int    $per_page = 20,
69
-               $filter = '',
70
-               $siteId = 0,
69
+                $filter = '',
70
+                $siteId = 0,
71 71
     ): Response {
72 72
         $data = [];
73 73
         $sortField = 'sourceName';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @inheritdoc
47 47
      */
48
-    protected array|bool|int $allowAnonymous = [
48
+    protected array | bool | int $allowAnonymous = [
49 49
     ];
50 50
 
51 51
     // Public Methods
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         // Query the db table
100 100
         $offset = ($page - 1) * $per_page;
101 101
         $currentSiteHandle = '';
102
-        if ((int)$siteId !== 0) {
102
+        if ((int) $siteId !== 0) {
103 103
             $site = Craft::$app->getSites()->getSiteById($siteId);
104 104
             if ($site !== null) {
105 105
                 $currentSiteHandle = $site->handle;
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
                     $numGrades = count(SettingsController::SETUP_GRADES);
157 157
                     $numFields = count(SettingsController::SEO_SETUP_FIELDS);
158 158
                     foreach (SettingsController::SEO_SETUP_FIELDS as $setupField => $setupLabel) {
159
-                        $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]);
159
+                        $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]);
160 160
                         $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0;
161 161
                         $variables['contentSetupChecklist'][$setupField] = [
162 162
                             'label' => $setupLabel,
163
-                            'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]),
163
+                            'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]),
164 164
                         ];
165 165
                     }
166 166
                     $stat = round($numGrades - (($stat * $numGrades) / $numFields));
Please login to merge, or discard this patch.