Passed
Pull Request — v1 (#2)
by John D
10:56
created
src/services/ViteService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $this->manifestShimsIncluded = true;
212 212
         }
213 213
 
214
-        foreach(array_merge($tags, $legacyTags) as $tag) {
214
+        foreach (array_merge($tags, $legacyTags) as $tag) {
215 215
             if (!empty($tag)) {
216 216
                 $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
217 217
                 switch ($tag['type']) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         $view->registerJsFile(
300 300
             $url,
301 301
             array_merge(['type' => 'module'], $scriptTagAttrs),
302
-            md5($url . JsonHelper::encode($scriptTagAttrs))
302
+            md5($url.JsonHelper::encode($scriptTagAttrs))
303 303
         );
304 304
     }
305 305
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
             }
336 336
             $this->manifestShimsIncluded = true;
337 337
         }
338
-        foreach(array_merge($tags, $legacyTags) as $tag) {
338
+        foreach (array_merge($tags, $legacyTags) as $tag) {
339 339
             if (!empty($tag)) {
340 340
                 $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
341 341
                 switch ($tag['type']) {
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                         $view->registerJsFile(
344 344
                             $url,
345 345
                             $tag['options'],
346
-                            md5($url . JsonHelper::encode($tag['options']))
346
+                            md5($url.JsonHelper::encode($tag['options']))
347 347
                         );
348 348
                         break;
349 349
                     case 'css':
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
     public function invalidateCaches()
402 402
     {
403 403
         $cache = Craft::$app->getCache();
404
-        TagDependency::invalidate($cache, FileHelper::CACHE_TAG . $this->cacheKeySuffix);
404
+        TagDependency::invalidate($cache, FileHelper::CACHE_TAG.$this->cacheKeySuffix);
405 405
         Craft::info('All Vite caches cleared', __METHOD__);
406 406
     }
407 407
 
Please login to merge, or discard this patch.
src/helpers/ManifestHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@  discard block
 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
     /**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		}
196 196
 
197 197
 		$imports = $entry['imports'] ?? [];
198
-		foreach($imports as $import) {
198
+		foreach ($imports as $import) {
199 199
 			$importFiles[] = $manifest[$import]['file'];
200 200
 			self::extractImportFiles($manifest, $import, $importFiles);
201 201
 		}
Please login to merge, or discard this patch.