Passed
Push — develop ( 09751f...668fb1 )
by Andrew
20:14
created
src/helpers/ManifestHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@
 block discarded – undo
45 45
     public static function fetchManifest(string $manifestPath)
46 46
     {
47 47
         // Grab the manifest
48
-        $pathOrUrl = (string)Craft::parseEnv($manifestPath);
48
+        $pathOrUrl = (string) Craft::parseEnv($manifestPath);
49 49
         $manifest = FileHelper::fetch($pathOrUrl, [JsonHelper::class, 'decodeIfJson']);
50 50
         // If no manifest file is found, log it
51 51
         if ($manifest === null) {
52
-            Craft::error('Manifest not found at ' . $manifestPath, __METHOD__);
52
+            Craft::error('Manifest not found at '.$manifestPath, __METHOD__);
53 53
         }
54 54
         // Ensure we're dealing with an array
55
-        self::$manifest = (array)$manifest;
55
+        self::$manifest = (array) $manifest;
56 56
     }
57 57
 
58 58
     /**
Please login to merge, or discard this patch.
src/helpers/FileHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public static function fetch(string $pathOrUrl, callable $callback = null, string $cacheKeySuffix = '')
56 56
     {
57
-        $pathOrUrl = (string)Craft::parseEnv($pathOrUrl);
57
+        $pathOrUrl = (string) Craft::parseEnv($pathOrUrl);
58 58
         // Create the dependency tags
59 59
         $dependency = new TagDependency([
60 60
             'tags' => [
61
-                self::CACHE_TAG . $cacheKeySuffix,
62
-                self::CACHE_TAG . $cacheKeySuffix . $pathOrUrl,
61
+                self::CACHE_TAG.$cacheKeySuffix,
62
+                self::CACHE_TAG.$cacheKeySuffix.$pathOrUrl,
63 63
             ],
64 64
         ]);
65 65
         // If this is a file path such as for the `manifest.json`, add a FileDependency so it's cache bust if the file changes
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         // Get the result from the cache, or parse the file
81 81
         $cache = Craft::$app->getCache();
82 82
         return $cache->getOrSet(
83
-            self::CACHE_KEY . $cacheKeySuffix . $pathOrUrl,
84
-            function () use ($pathOrUrl, $callback) {
83
+            self::CACHE_KEY.$cacheKeySuffix.$pathOrUrl,
84
+            function() use ($pathOrUrl, $callback) {
85 85
                 $contents = null;
86 86
                 $result = null;
87 87
                 if (UrlHelper::isAbsoluteUrl($pathOrUrl)) {
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public static function createUrl(string $url, string $path): string
135 135
     {
136
-        $url = (string)Craft::parseEnv($url);
137
-        return rtrim($url, '/') . '/' . trim($path, '/');
136
+        $url = (string) Craft::parseEnv($url);
137
+        return rtrim($url, '/').'/'.trim($path, '/');
138 138
     }
139 139
 
140 140
     /**
Please login to merge, or discard this patch.
src/services/ViteService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                 // Replace the hard-coded dev server URL with whatever they have theirs set to
166 166
                 $script = str_replace(
167 167
                     'http://localhost:3000/',
168
-                    rtrim($this->devServerPublic, '/') . '/',
168
+                    rtrim($this->devServerPublic, '/').'/',
169 169
                     $script
170 170
                 );
171 171
                 $lines[] = HtmlHelper::script(
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 // Replace the hard-coded dev server URL with whatever they have theirs set to
271 271
                 $script = str_replace(
272 272
                     'http://localhost:3000/',
273
-                    rtrim($this->devServerPublic, '/') . '/',
273
+                    rtrim($this->devServerPublic, '/').'/',
274 274
                     $script
275 275
                 );
276 276
                 $view->registerScript(
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $view->registerJsFile(
290 290
             $url,
291 291
             array_merge(['type' => 'module'], $scriptTagAttrs),
292
-            md5($url . JsonHelper::encode($scriptTagAttrs))
292
+            md5($url.JsonHelper::encode($scriptTagAttrs))
293 293
         );
294 294
     }
295 295
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
     public function invalidateCaches()
380 380
     {
381 381
         $cache = Craft::$app->getCache();
382
-        TagDependency::invalidate($cache, FileHelper::CACHE_TAG . $this->cacheKeySuffix);
382
+        TagDependency::invalidate($cache, FileHelper::CACHE_TAG.$this->cacheKeySuffix);
383 383
         Craft::info('All Vite caches cleared', __METHOD__);
384 384
     }
385 385
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                         $view->registerJsFile(
478 478
                             $url,
479 479
                             $tag['options'],
480
-                            md5($url . JsonHelper::encode($tag['options']))
480
+                            md5($url.JsonHelper::encode($tag['options']))
481 481
                         );
482 482
                         break;
483 483
                     case 'css':
Please login to merge, or discard this patch.