Passed
Pull Request — v1 (#2)
by John D
08:05
created
src/services/ViteService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             $this->manifestShimsIncluded = true;
217 217
         }
218 218
 
219
-        foreach(array_merge($tags, $legacyTags) as $tag) {
219
+        foreach (array_merge($tags, $legacyTags) as $tag) {
220 220
             if (!empty($tag)) {
221 221
                 $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
222 222
                 switch ($tag['type']) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
         // modulepreload any imports from modern tags
236 236
 	    $modulepreloadPolyfillRequired = false;
237
-	    foreach($tags as $tag) {
237
+	    foreach ($tags as $tag) {
238 238
 		    if (!empty($tag)) {
239 239
 			    $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
240 240
 			    switch ($tag['type']) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 			    }
252 252
 		    }
253 253
 	    }
254
-	    if($modulepreloadPolyfillRequired && ! $this->modulepreloadPolyfillIncluded) {
254
+	    if ($modulepreloadPolyfillRequired && !$this->modulepreloadPolyfillIncluded) {
255 255
 	        $this->modulepreloadPolyfillIncluded = true;
256 256
 	        $lines[] = HtmlHelper::script(
257 257
 		        FileHelper::fetchScript('modulepreload-polyfill.min.js', $this->cacheKeySuffix),
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         $view->registerJsFile(
325 325
             $url,
326 326
             array_merge(['type' => 'module'], $scriptTagAttrs),
327
-            md5($url . JsonHelper::encode($scriptTagAttrs))
327
+            md5($url.JsonHelper::encode($scriptTagAttrs))
328 328
         );
329 329
     }
330 330
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
             }
361 361
             $this->manifestShimsIncluded = true;
362 362
         }
363
-        foreach(array_merge($tags, $legacyTags) as $tag) {
363
+        foreach (array_merge($tags, $legacyTags) as $tag) {
364 364
             if (!empty($tag)) {
365 365
                 $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
366 366
                 switch ($tag['type']) {
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                         $view->registerJsFile(
369 369
                             $url,
370 370
                             $tag['options'],
371
-                            md5($url . JsonHelper::encode($tag['options']))
371
+                            md5($url.JsonHelper::encode($tag['options']))
372 372
                         );
373 373
                         break;
374 374
                     case 'css':
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
 	    // modulepreload any imports from modern tags
387 387
 	    $modulepreloadPolyfillRequired = false;
388
-	    foreach($tags as $tag) {
388
+	    foreach ($tags as $tag) {
389 389
 		    if (!empty($tag)) {
390 390
 			    $url = FileHelper::createUrl($this->serverPublic, $tag['url']);
391 391
 			    switch ($tag['type']) {
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			    }
406 406
 		    }
407 407
 	    }
408
-	    if($modulepreloadPolyfillRequired && ! $this->modulepreloadPolyfillIncluded) {
408
+	    if ($modulepreloadPolyfillRequired && !$this->modulepreloadPolyfillIncluded) {
409 409
 		    $this->modulepreloadPolyfillIncluded = true;
410 410
 		    $view->registerScript(
411 411
 			    FileHelper::fetchScript('modulepreload-polyfill.min.js', $this->cacheKeySuffix),
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     public function invalidateCaches()
459 459
     {
460 460
         $cache = Craft::$app->getCache();
461
-        TagDependency::invalidate($cache, FileHelper::CACHE_TAG . $this->cacheKeySuffix);
461
+        TagDependency::invalidate($cache, FileHelper::CACHE_TAG.$this->cacheKeySuffix);
462 462
         Craft::info('All Vite caches cleared', __METHOD__);
463 463
     }
464 464
 
Please login to merge, or discard this patch.