Passed
Push — v4 ( 2cf7f4...81628e )
by Andrew
11:39 queued 13s
created
src/helpers/UrlHelper.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
             $siteUrl = MetaValue::parseString($siteUrl);
45 45
             // Extract out just the path part
46 46
             $parts = self::decomposeUrl($path);
47
-            $path = $parts['path'] . $parts['suffix'];
47
+            $path = $parts['path'].$parts['suffix'];
48 48
             $url = self::mergeUrlWithPath($siteUrl, $path);
49 49
             // Handle trailing slashes properly for generated URLs
50 50
             $generalConfig = Craft::$app->getConfig()->getGeneral();
51 51
             if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) {
52
-                $url = rtrim($url, '/') . '/';
52
+                $url = rtrim($url, '/').'/';
53 53
             }
54 54
             if (!$generalConfig->addTrailingSlashesToUrls) {
55 55
                 $url = rtrim($url, '/');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             }
83 83
         }
84 84
 
85
-        return rtrim($url, '/') . '/' . ltrim(substr($path, $overlap), '/');
85
+        return rtrim($url, '/').'/'.ltrim(substr($path, $overlap), '/');
86 86
     }
87 87
 
88 88
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         // Handle trailing slashes properly for generated URLs
151 151
         $generalConfig = Craft::$app->getConfig()->getGeneral();
152 152
         if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) {
153
-            $url = rtrim($url, '/') . '/';
153
+            $url = rtrim($url, '/').'/';
154 154
         }
155 155
         if (!$generalConfig->addTrailingSlashesToUrls) {
156 156
             $url = rtrim($url, '/');
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
         $urlParts = parse_url($url);
171 171
         $encodedUrl = "";
172 172
         if (isset($urlParts['scheme'])) {
173
-            $encodedUrl .= $urlParts['scheme'] . '://';
173
+            $encodedUrl .= $urlParts['scheme'].'://';
174 174
         }
175 175
         if (isset($urlParts['host'])) {
176 176
             $encodedUrl .= $urlParts['host'];
177 177
         }
178 178
         if (isset($urlParts['port'])) {
179
-            $encodedUrl .= ':' . $urlParts['port'];
179
+            $encodedUrl .= ':'.$urlParts['port'];
180 180
         }
181 181
         if (isset($urlParts['path'])) {
182 182
             $encodedUrl .= $urlParts['path'];
@@ -186,15 +186,15 @@  discard block
 block discarded – undo
186 186
             foreach ($query as $j => $value) {
187 187
                 $value = explode('=', $value, 2);
188 188
                 if (count($value) === 2) {
189
-                    $query[$j] = urlencode($value[0]) . '=' . urlencode($value[1]);
189
+                    $query[$j] = urlencode($value[0]).'='.urlencode($value[1]);
190 190
                 } else {
191 191
                     $query[$j] = urlencode($value[0]);
192 192
                 }
193 193
             }
194
-            $encodedUrl .= '?' . implode('&', $query);
194
+            $encodedUrl .= '?'.implode('&', $query);
195 195
         }
196 196
         if (isset($urlParts['fragment'])) {
197
-            $encodedUrl .= '#' . $urlParts['fragment'];
197
+            $encodedUrl .= '#'.$urlParts['fragment'];
198 198
         }
199 199
 
200 200
         return $encodedUrl;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             if ($siteId !== null) {
235 235
                 $site = $sites->getSiteById($siteId, true);
236 236
                 if (!$site) {
237
-                    throw new Exception('Invalid site ID: ' . $siteId);
237
+                    throw new Exception('Invalid site ID: '.$siteId);
238 238
                 }
239 239
             }
240 240
 
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
 
261 261
         if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) {
262 262
             $url_parts = parse_url($pathOrUrl);
263
-            $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host'];
263
+            $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host'];
264 264
             $result['path'] = $url_parts['path'] ?? '';
265 265
             $result['suffix'] = '';
266
-            $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query'];
267
-            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment'];
266
+            $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query'];
267
+            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment'];
268 268
         } else {
269 269
             $result['prefix'] = '';
270 270
             $result['path'] = $pathOrUrl;
Please login to merge, or discard this patch.
src/debug/views/seomatic/render-copy-menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 }
14 14
 $tooltip = implode(PHP_EOL, array_slice($codeExamples, 0, 4));
15 15
 $bundle = $this->getAssetManager()->getBundle(DebugAsset::class);
16
-$iconUrl = $bundle->baseUrl . "/img/copy-icon.svg";
16
+$iconUrl = $bundle->baseUrl."/img/copy-icon.svg";
17 17
 ?>
18 18
 <div class="seomatic-property-copy-wrapper" title="<?= $tooltip ?>">
19 19
     <?= Html::img($iconUrl) ?>
Please login to merge, or discard this patch.
ecs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 return static function(ECSConfig $ecsConfig): void {
7 7
     $ecsConfig->paths([
8
-        __DIR__ . '/src',
8
+        __DIR__.'/src',
9 9
         __FILE__,
10 10
     ]);
11 11
     $ecsConfig->parallel();
Please login to merge, or discard this patch.
src/helpers/JsonLd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
         );
107 107
         // Rename keys as appropriate
108 108
         foreach (self::AT_PREFIXED_ATTRIBUTES as $key) {
109
-            $array = self::changeKey($array, $key, '@' . $key);
109
+            $array = self::changeKey($array, $key, '@'.$key);
110 110
         }
111 111
         if ($depth > 1) {
112 112
             foreach (self::IGNORE_ATTRIBUTES as $attribute) {
Please login to merge, or discard this patch.
src/helpers/Localization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $language = str_replace('-', '_', $language);
37 37
         if (strlen($language) === 2) {
38
-            $language = strtolower($language) . '_' . strtoupper($language);
38
+            $language = strtolower($language).'_'.strtoupper($language);
39 39
         }
40 40
 
41 41
         return $language;
Please login to merge, or discard this patch.
src/helpers/DynamicMeta.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         if ($pageInfo !== null && $pageInfo->currentPage !== null) {
85 85
             // Let the meta containers know that this page is paginated
86
-            Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage;
86
+            Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage;
87 87
             // See if we should strip the query params
88 88
             $stripQueryParams = true;
89 89
             $pageTrigger = Craft::$app->getConfig()->getGeneral()->pageTrigger;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                     if (is_array($content)) {
160 160
                         $headerValue = '';
161 161
                         foreach ($content as $contentVal) {
162
-                            $headerValue .= ($contentVal . ',');
162
+                            $headerValue .= ($contentVal.',');
163 163
                         }
164 164
                         $headerValue = rtrim($headerValue, ',');
165 165
                     } else {
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
                     if (is_array($href)) {
179 179
                         $headerValue = '';
180 180
                         foreach ($href as $hrefVal) {
181
-                            $headerValue .= ('<' . $hrefVal . '>' . ',');
181
+                            $headerValue .= ('<'.$hrefVal.'>'.',');
182 182
                         }
183 183
                         $headerValue = rtrim($headerValue, ',');
184 184
                     } else {
185
-                        $headerValue = '<' . $href . '>';
185
+                        $headerValue = '<'.$href.'>';
186 186
                     }
187 187
                     $headerValue .= "; rel='canonical'";
188 188
                     $response->headers->add('Link', $headerValue);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     if (is_array($content)) {
199 199
                         $headerValue = '';
200 200
                         foreach ($content as $contentVal) {
201
-                            $headerValue .= ($contentVal . ',');
201
+                            $headerValue .= ($contentVal.',');
202 202
                         }
203 203
                         $headerValue = rtrim($headerValue, ',');
204 204
                     } else {
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
                         }
593 593
                     }
594 594
                     // Never include the URL if the element isn't enabled for the site
595
-                    if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) {
595
+                    if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) {
596 596
                         $includeUrl = false;
597 597
                     }
598 598
                 } else {
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
                 if (isset($value[$day][$time])
802 802
                     && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false
803 803
                 ) {
804
-                    $normalized[$day][$time] = (array)($date);
804
+                    $normalized[$day][$time] = (array) ($date);
805 805
                 } else {
806 806
                     $normalized[$day][$time] = null;
807 807
                 }
Please login to merge, or discard this patch.
src/helpers/Container.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -80,24 +80,24 @@
 block discarded – undo
80 80
         $metaContainers = Seomatic::$plugin->metaContainers;
81 81
         // Get our cache key
82 82
         $asArrayKey = $asArray ? 'true' : 'false';
83
-        $cacheKey = $uri . $siteId . implode($containerKeys) . $asArrayKey . Seomatic::$environment;
83
+        $cacheKey = $uri.$siteId.implode($containerKeys).$asArrayKey.Seomatic::$environment;
84 84
         // Load the meta containers
85 85
         $dependency = new TagDependency([
86 86
             'tags' => [
87 87
                 $metaContainers::GLOBAL_METACONTAINER_CACHE_TAG,
88
-                $metaContainers::METACONTAINER_CACHE_TAG . $sourceId . $sourceBundleType . $siteId,
89
-                $metaContainers::METACONTAINER_CACHE_TAG . $uri . $siteId,
90
-                $metaContainers::METACONTAINER_CACHE_TAG . $cacheKey,
88
+                $metaContainers::METACONTAINER_CACHE_TAG.$sourceId.$sourceBundleType.$siteId,
89
+                $metaContainers::METACONTAINER_CACHE_TAG.$uri.$siteId,
90
+                $metaContainers::METACONTAINER_CACHE_TAG.$cacheKey,
91 91
             ],
92 92
         ]);
93 93
 
94 94
         $cache = Craft::$app->getCache();
95 95
         $result = $cache->getOrSet(
96
-            self::CACHE_KEY . $cacheKey,
96
+            self::CACHE_KEY.$cacheKey,
97 97
             function() use ($uri, $siteId, $containerKeys, $asArray) {
98 98
                 $result = [];
99 99
                 Craft::info(
100
-                    'Meta controller container cache miss: ' . $uri . '/' . $siteId,
100
+                    'Meta controller container cache miss: '.$uri.'/'.$siteId,
101 101
                     __METHOD__
102 102
                 );
103 103
                 // Load the meta containers and parse our globals
Please login to merge, or discard this patch.
src/Node/Expression/EmptyCoalesceExpression.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@
 block discarded – undo
64 64
     {
65 65
         //$this->getNode('expr1')->setAttribute('always_defined', true);
66 66
         $compiler
67
-            ->raw('((' . self::class . '::empty(')
67
+            ->raw('(('.self::class.'::empty(')
68 68
             ->subcompile($this->getNode('left'))
69 69
             ->raw(') ? null : ')
70 70
             ->subcompile($this->getNode('left'))
71
-            ->raw(') ?? (' . self::class . '::empty(')
71
+            ->raw(') ?? ('.self::class.'::empty(')
72 72
             ->subcompile($this->getNode('right'))
73 73
             ->raw(') ? null : ')
74 74
             ->subcompile($this->getNode('right'))
Please login to merge, or discard this patch.
src/validators/EmbeddedModelValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                         $model->addError(
45 45
                             $attribute,
46 46
                             Craft::t('seomatic', 'Object failed to validate')
47
-                            . '-' . $attributeError . ' - ' . $valueError
47
+                            . '-'.$attributeError.' - '.$valueError
48 48
                         );
49 49
                     }
50 50
                 }
Please login to merge, or discard this patch.