Passed
Pull Request — v1 (#51)
by
unknown
05:53
created
src/helpers/Manifest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -208,10 +208,10 @@  discard block
 block discarded – undo
208 208
 
209 209
         if (count($moduleList) === 0) {
210 210
             self::reportError(Craft::t(
211
-              'twigpack',
212
-              'Module path not found, or empty, in the manifest: {moduleName}',
213
-              ['moduleName' => $moduleName]
214
-          ), true);
211
+                'twigpack',
212
+                'Module path not found, or empty, in the manifest: {moduleName}',
213
+                ['moduleName' => $moduleName]
214
+            ), true);
215 215
 
216 216
             return '';
217 217
         }
@@ -812,9 +812,9 @@  discard block
 block discarded – undo
812 812
     }
813 813
 
814 814
     /**
815
-    * @param string $moduleName
816
-    * @param array $params
817
-    * @param array $attributes
815
+     * @param string $moduleName
816
+     * @param array $params
817
+     * @param array $attributes
818 818
      *
819 819
      * @return string
820 820
      */
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
                 $dirPrefix = CRAFT_TEMPLATES_PATH;
147 147
             }
148 148
             $name = strstr($name, $dirPrefix);
149
-            $name = (string)str_replace($dirPrefix, '', $name);
149
+            $name = (string) str_replace($dirPrefix, '', $name);
150 150
             $path = self::combinePaths(
151 151
                     $config['localFiles']['basePath'],
152 152
                     $config['localFiles']['criticalPrefix'],
153 153
                     $name
154
-                ) . $config['localFiles']['criticalSuffix'];
154
+                ).$config['localFiles']['criticalSuffix'];
155 155
 
156 156
             return self::getCssInlineTags($path, $attributes);
157 157
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 // Ensure flat array, ex: if [*] is forgotten in the json path
199 199
                 // targeting an array
200 200
                 $flattened = [];
201
-                array_walk_recursive($moduleList, function ($item) use (&$flattened) {
201
+                array_walk_recursive($moduleList, function($item) use (&$flattened) {
202 202
                     $flattened[] = $item;
203 203
                 });
204 204
 
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
         $dependency = new TagDependency([
629 629
             'tags' => [
630 630
                 self::CACHE_TAG,
631
-                self::CACHE_TAG . $path,
631
+                self::CACHE_TAG.$path,
632 632
             ],
633 633
         ]);
634 634
         // Set the cache duration based on devMode
@@ -644,8 +644,8 @@  discard block
 block discarded – undo
644 644
         $settings = Twigpack::$plugin->getSettings();
645 645
         $cacheKeySuffix = $settings->cacheKeySuffix ?? '';
646 646
         $file = $cache->getOrSet(
647
-            self::CACHE_KEY . $cacheKeySuffix . $path,
648
-            function () use ($path, $callback) {
647
+            self::CACHE_KEY.$cacheKeySuffix.$path,
648
+            function() use ($path, $callback) {
649 649
                 $result = null;
650 650
                 if (UrlHelper::isAbsoluteUrl($path)) {
651 651
                     /**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
     protected static function combinePaths(string ...$paths): string
696 696
     {
697 697
         $last_key = count($paths) - 1;
698
-        array_walk($paths, function (&$val, $key) use ($last_key) {
698
+        array_walk($paths, function(&$val, $key) use ($last_key) {
699 699
             switch ($key) {
700 700
                 case 0:
701 701
                     $val = rtrim($val, '/ ');
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
                         ]);
759 759
                         break;
760 760
                     case 'header':
761
-                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';');
761
+                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';');
762 762
                         break;
763 763
                     default:
764 764
                         break;
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
     {
805 805
         $json = JsonHelper::decodeIfJson($string);
806 806
         if (is_string($json)) {
807
-            Craft::error('Error decoding JSON file: ' . $json, __METHOD__);
807
+            Craft::error('Error decoding JSON file: '.$json, __METHOD__);
808 808
             $json = null;
809 809
         }
810 810
 
Please login to merge, or discard this patch.