Passed
Push — develop ( c34932...c59426 )
by Andrew
04:24
created
src/helpers/Manifest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
                 $dirPrefix = CRAFT_TEMPLATES_PATH;
152 152
             }
153 153
             $name = strstr($name, $dirPrefix);
154
-            $name = (string)str_replace($dirPrefix, '', $name);
154
+            $name = (string) str_replace($dirPrefix, '', $name);
155 155
             $path = self::combinePaths(
156 156
                     $config['localFiles']['basePath'],
157 157
                     $config['localFiles']['criticalPrefix'],
158 158
                     $name
159
-                ) . $config['localFiles']['criticalSuffix'];
159
+                ).$config['localFiles']['criticalSuffix'];
160 160
 
161 161
             return self::getCssInlineTags($path, $attributes);
162 162
         }
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
         $dependency = new TagDependency([
564 564
             'tags' => [
565 565
                 self::CACHE_TAG,
566
-                self::CACHE_TAG . $path,
566
+                self::CACHE_TAG.$path,
567 567
             ],
568 568
         ]);
569 569
         // If this is a file path such as for the `manifest.json`, add a FileDependency so it's cache bust if the file changes
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
         $settings = Twigpack::$plugin->getSettings();
591 591
         $cacheKeySuffix = $settings->cacheKeySuffix ?? '';
592 592
         $file = $cache->getOrSet(
593
-            self::CACHE_KEY . $cacheKeySuffix . $path,
594
-            function () use ($path, $callback) {
593
+            self::CACHE_KEY.$cacheKeySuffix.$path,
594
+            function() use ($path, $callback) {
595 595
                 $result = null;
596 596
                 $contents = null;
597 597
                 if (UrlHelper::isAbsoluteUrl($path)) {
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
                         if ($response->getStatusCode() === 200) {
612 612
                             $contents = $response->getBody()->getContents();
613 613
                         }
614
-                    } catch(GuzzleException $e) {
614
+                    } catch (GuzzleException $e) {
615 615
                         Craft::error($e, __METHOD__);
616 616
                     }
617 617
                 } else {
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
     protected static function combinePaths(string ...$paths): string
662 662
     {
663 663
         $last_key = count($paths) - 1;
664
-        array_walk($paths, function (&$val, $key) use ($last_key) {
664
+        array_walk($paths, function(&$val, $key) use ($last_key) {
665 665
             switch ($key) {
666 666
                 case 0:
667 667
                     $val = rtrim($val, '/ ');
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
         $cspNonceType = self::getCspNonceType();
716 716
         if ($cspNonceType) {
717 717
             $cspValue = "{$cspDirective} 'nonce-$nonce'";
718
-            foreach(self::CSP_HEADERS as $cspHeader) {
718
+            foreach (self::CSP_HEADERS as $cspHeader) {
719 719
                 switch ($cspNonceType) {
720 720
                     case 'tag':
721 721
                         Craft::$app->getView()->registerMetaTag([
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
                         ]);
725 725
                         break;
726 726
                     case 'header':
727
-                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';');
727
+                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';');
728 728
                         break;
729 729
                     default:
730 730
                         break;
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
     {
771 771
         $json = JsonHelper::decodeIfJson($string);
772 772
         if (is_string($json)) {
773
-            Craft::error('Error decoding JSON file: ' . $json, __METHOD__);
773
+            Craft::error('Error decoding JSON file: '.$json, __METHOD__);
774 774
             $json = null;
775 775
         }
776 776
 
Please login to merge, or discard this patch.