Passed
Push — v3 ( 9af8ac...482808 )
by Andrew
20:05 queued 13s
created
src/services/Helper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $baseUrl = UrlHelper::hostInfo(UrlHelper::siteUrl($path));
66 66
 
67
-        return rtrim($baseUrl, '/') . '/' . ltrim($path, '/');
67
+        return rtrim($baseUrl, '/').'/'.ltrim($path, '/');
68 68
     }
69 69
 
70 70
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         $metaSiteVars = Seomatic::$plugin->metaContainers->metaSiteVars;
109 109
         if ($metaSiteVars && !empty($metaSiteVars->siteLinksQueryInput)) {
110
-            $result = 'required name=' . $metaSiteVars->siteLinksQueryInput;
110
+            $result = 'required name='.$metaSiteVars->siteLinksQueryInput;
111 111
         }
112 112
 
113 113
         return $result;
@@ -568,8 +568,8 @@  discard block
 block discarded – undo
568 568
      */
569 569
     public function isInherited(InheritableSettingsModel $settingCollection, $settingName)
570 570
     {
571
-        $explicitInherit = array_key_exists($settingName, (array)$settingCollection->inherited);
572
-        $explicitOverride = array_key_exists($settingName, (array)$settingCollection->overrides);
571
+        $explicitInherit = array_key_exists($settingName, (array) $settingCollection->inherited);
572
+        $explicitOverride = array_key_exists($settingName, (array) $settingCollection->overrides);
573 573
 
574 574
         if ($explicitInherit || $explicitOverride) {
575 575
             return $explicitInherit && !$explicitOverride;
Please login to merge, or discard this patch.
src/services/Title.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function add($metaItem, string $handle = self::GENERAL_HANDLE)
67 67
     {
68
-        $key = MetaTitleContainer::CONTAINER_TYPE . $handle;
68
+        $key = MetaTitleContainer::CONTAINER_TYPE.$handle;
69 69
         Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key);
70 70
 
71 71
         /** @var MetaTitle $metaItem */
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function container(string $handle = self::GENERAL_HANDLE)
91 91
     {
92
-        $key = MetaTitleContainer::CONTAINER_TYPE . $handle;
92
+        $key = MetaTitleContainer::CONTAINER_TYPE.$handle;
93 93
 
94 94
         return Seomatic::$plugin->metaContainers->getMetaContainer($key);
95 95
     }
Please login to merge, or discard this patch.
src/services/Tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function add($metaItem, string $handle = self::GENERAL_HANDLE)
78 78
     {
79
-        $key = MetaTagContainer::CONTAINER_TYPE . $handle;
79
+        $key = MetaTagContainer::CONTAINER_TYPE.$handle;
80 80
         Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key);
81 81
 
82 82
         /** @var MetaTag $metaItem */
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function container(string $handle = self::GENERAL_HANDLE)
102 102
     {
103
-        $key = MetaTagContainer::CONTAINER_TYPE . $handle;
103
+        $key = MetaTagContainer::CONTAINER_TYPE.$handle;
104 104
 
105 105
         return Seomatic::$plugin->metaContainers->getMetaContainer($key);
106 106
     }
Please login to merge, or discard this patch.
src/services/Script.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function add($metaItem, string $handle = self::GENERAL_HANDLE)
67 67
     {
68
-        $key = MetaScriptContainer::CONTAINER_TYPE . $handle;
68
+        $key = MetaScriptContainer::CONTAINER_TYPE.$handle;
69 69
         Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key);
70 70
 
71 71
         /** @var MetaScript $metaItem */
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function container(string $handle = self::GENERAL_HANDLE)
91 91
     {
92
-        $key = MetaScriptContainer::CONTAINER_TYPE . $handle;
92
+        $key = MetaScriptContainer::CONTAINER_TYPE.$handle;
93 93
 
94 94
         return Seomatic::$plugin->metaContainers->getMetaContainer($key);
95 95
     }
Please login to merge, or discard this patch.
src/services/JsonLd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function add($metaItem, string $handle = self::GENERAL_HANDLE): MetaJsonLd
74 74
     {
75
-        $key = MetaJsonLdContainer::CONTAINER_TYPE . $handle;
75
+        $key = MetaJsonLdContainer::CONTAINER_TYPE.$handle;
76 76
         Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key);
77 77
 
78 78
         /** @var MetaJsonLd $metaItem */
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function container(string $handle = self::GENERAL_HANDLE)
98 98
     {
99
-        $key = MetaJsonLdContainer::CONTAINER_TYPE . $handle;
99
+        $key = MetaJsonLdContainer::CONTAINER_TYPE.$handle;
100 100
 
101 101
         return Seomatic::$plugin->metaContainers->getMetaContainer($key);
102 102
     }
Please login to merge, or discard this patch.
src/services/Link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function add($metaItem, string $handle = self::GENERAL_HANDLE)
77 77
     {
78
-        $key = MetaLinkContainer::CONTAINER_TYPE . $handle;
78
+        $key = MetaLinkContainer::CONTAINER_TYPE.$handle;
79 79
         Seomatic::$plugin->metaContainers->addToMetaContainer($metaItem, $key);
80 80
 
81 81
         /** @var MetaLink $metaItem */
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function container(string $handle = self::GENERAL_HANDLE)
101 101
     {
102
-        $key = MetaLinkContainer::CONTAINER_TYPE . $handle;
102
+        $key = MetaLinkContainer::CONTAINER_TYPE.$handle;
103 103
 
104 104
         return Seomatic::$plugin->metaContainers->getMetaContainer($key);
105 105
     }
Please login to merge, or discard this patch.
src/console/controllers/SitemapController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function actionGenerate()
76 76
     {
77
-        echo 'Generating sitemap' . PHP_EOL;
77
+        echo 'Generating sitemap'.PHP_EOL;
78 78
         if ($this->siteId !== null) {
79 79
             $siteIds[] = $this->siteId;
80 80
         } else {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                         ]);
117 117
                     }
118 118
 
119
-                    echo '---' . PHP_EOL;
119
+                    echo '---'.PHP_EOL;
120 120
                 }
121 121
             }
122 122
         }
Please login to merge, or discard this patch.
src/models/SitemapTemplate.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
         }
149 149
 
150 150
         $cache = Craft::$app->getCache();
151
-        $uniqueKey = $groupId . $type . $handle . $siteId;
152
-        $cacheKey = self::CACHE_KEY . $uniqueKey;
153
-        $queueJobCacheKey = self::QUEUE_JOB_CACHE_KEY . $uniqueKey;
151
+        $uniqueKey = $groupId.$type.$handle.$siteId;
152
+        $cacheKey = self::CACHE_KEY.$uniqueKey;
153
+        $queueJobCacheKey = self::QUEUE_JOB_CACHE_KEY.$uniqueKey;
154 154
         $result = $cache->get($cacheKey);
155 155
         // If the sitemap isn't cached, start a job to create it
156 156
         // Even if it is cached, if $throwException === false we should regenerate it, as it is part of
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                 $dependency = new TagDependency([
190 190
                     'tags' => [
191 191
                         self::GLOBAL_SITEMAP_CACHE_TAG,
192
-                        self::CACHE_KEY . $uniqueKey,
192
+                        self::CACHE_KEY.$uniqueKey,
193 193
                     ],
194 194
                 ]);
195 195
                 $cache->set($queueJobCacheKey, $jobId, $cacheDuration, $dependency);
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
                 // Return an empty XML document
222 222
                 $lines[] = '<?xml version="1.0" encoding="UTF-8"?>';
223 223
                 $lines[] = '<?xml-stylesheet type="text/xsl" href="sitemap-empty.xsl"?>';
224
-                $lines[] = '<!-- ' . Craft::t('seomatic', 'This sitemap has not been generated yet.') . ' -->';
225
-                $lines[] = '<!-- ' . Craft::t('seomatic', 'If you are seeing this in local dev or an') . ' -->';
226
-                $lines[] = '<!-- ' . Craft::t('seomatic', 'environment with `devMode` on, caches only') . ' -->';
227
-                $lines[] = '<!-- ' . Craft::t('seomatic', 'last for 30 seconds in local dev, so it is') . ' -->';
228
-                $lines[] = '<!-- ' . Craft::t('seomatic', 'normal for the sitemap to not be cached.') . ' -->';
224
+                $lines[] = '<!-- '.Craft::t('seomatic', 'This sitemap has not been generated yet.').' -->';
225
+                $lines[] = '<!-- '.Craft::t('seomatic', 'If you are seeing this in local dev or an').' -->';
226
+                $lines[] = '<!-- '.Craft::t('seomatic', 'environment with `devMode` on, caches only').' -->';
227
+                $lines[] = '<!-- '.Craft::t('seomatic', 'last for 30 seconds in local dev, so it is').' -->';
228
+                $lines[] = '<!-- '.Craft::t('seomatic', 'normal for the sitemap to not be cached.').' -->';
229 229
                 $lines[] = '<urlset>';
230 230
                 $lines[] = '</urlset>';
231 231
             }
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
     public function invalidateCache(string $handle, int $siteId)
247 247
     {
248 248
         $cache = Craft::$app->getCache();
249
-        TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG . $handle . $siteId);
249
+        TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG.$handle.$siteId);
250 250
         Craft::info(
251
-            'Sitemap cache cleared: ' . $handle,
251
+            'Sitemap cache cleared: '.$handle,
252 252
             __METHOD__
253 253
         );
254 254
     }
Please login to merge, or discard this patch.
src/models/metalink/CanonicalLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                 // Craft adds the `tokenParam` URL param back in via UrlHelper, strip it again
101 101
                 if (Seomatic::$plugin->metaContainers->paginationPage === '1') {
102 102
                     $token = Craft::$app->getConfig()->getGeneral()->tokenParam;
103
-                    $url = preg_replace('~([?&])' . $token . '=[^&]*~', '$1', $url);
103
+                    $url = preg_replace('~([?&])'.$token.'=[^&]*~', '$1', $url);
104 104
                     $url = rtrim($url, '?&');
105 105
                     $url = str_replace(['&&', '?&'], ['&', '?'], $url);
106 106
                     $data['href'] = $url;
Please login to merge, or discard this patch.