Test Failed
Push — v4 ( dc2d65...c4514e )
by Andrew
22:06 queued 03:11
created
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/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/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.
src/helpers/PluginTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         array $params = [],
74 74
         string $minifier = null,
75 75
     ): string {
76
-        $template = 'seomatic/' . $templatePath;
76
+        $template = 'seomatic/'.$templatePath;
77 77
         $oldMode = Craft::$app->view->getTemplateMode();
78 78
         // Look for the template on the frontend first
79 79
         try {
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);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             foreach ($dataToValidate as $key => $data) {
384 384
                 /** @var array $expectedTypes */
385 385
                 foreach ($expectedTypes as $expectedType) {
386
-                    $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $expectedType;
386
+                    $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$expectedType;
387 387
                     switch ($expectedType) {
388 388
                         // Text always validates
389 389
                         case 'Text':
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                         case 'Date':
424 424
                             $validator = new DateValidator();
425 425
                             $validator->type = DateValidator::TYPE_DATE;
426
-                            $validator->format = 'php:' . DateTime::ATOM;
426
+                            $validator->format = 'php:'.DateTime::ATOM;
427 427
                             if ($validator->validate($data, $error)) {
428 428
                                 $validated = true;
429 429
                             }
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
                                 $validated = true;
470 470
                             }
471 471
                             if (is_string($data)) {
472
-                                $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\' . $data;
472
+                                $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\'.$data;
473 473
                                 if (class_exists($targetClass)) {
474 474
                                     $validated = true;
475 475
                                 }
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
                     }
479 479
                 }
480 480
                 if (!$validated) {
481
-                    $this->addError($attribute, 'Must be one of these types: ' . implode(', ', $expectedTypes));
481
+                    $this->addError($attribute, 'Must be one of these types: '.implode(', ', $expectedTypes));
482 482
                 }
483 483
             }
484 484
         }
Please login to merge, or discard this patch.
src/helpers/ImageTransform.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             if ($width === null) {
198 198
                 $width = '';
199 199
             }
200
-            $width = (string)$width;
200
+            $width = (string) $width;
201 201
         }
202 202
 
203 203
         return $width;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             if ($height === null) {
230 230
                 $height = '';
231 231
             }
232
-            $height = (string)$height;
232
+            $height = (string) $height;
233 233
         }
234 234
 
235 235
         return $height;
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
             if (is_array($assetIds)) {
252 252
                 foreach ($assetIds as $assetId) {
253 253
                     if (!empty($assetId)) {
254
-                        $assets[] = $elements->getElementById((int)$assetId, Asset::class, $siteId);
254
+                        $assets[] = $elements->getElementById((int) $assetId, Asset::class, $siteId);
255 255
                     }
256 256
                 }
257 257
             } else {
258 258
                 $assetId = $assetIds;
259
-                $assets[] = $elements->getElementById((int)$assetId, Asset::class, $siteId);
259
+                $assets[] = $elements->getElementById((int) $assetId, Asset::class, $siteId);
260 260
             }
261 261
         }
262 262
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             return $asset->one();
293 293
         }
294 294
 
295
-        $resolvedAssetId = (int)$asset;
295
+        $resolvedAssetId = (int) $asset;
296 296
         $resolvedSiteId = $siteId ?? 0;
297 297
         if (isset(self::$cachedAssetsElements[$resolvedAssetId][$resolvedSiteId])) {
298 298
             return self::$cachedAssetsElements[$resolvedAssetId][$resolvedSiteId];
Please login to merge, or discard this patch.