Passed
Push — develop ( a2c384...cbede7 )
by Andrew
07:23
created
src/helpers/Manifest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
     const ASSET_CLASS = TranscoderAsset::class;
36 36
 
37
-    const CACHE_KEY = 'twigpack-' . self::ASSET_CLASS;
38
-    const CACHE_TAG = 'twigpack-' . self::ASSET_CLASS;
37
+    const CACHE_KEY = 'twigpack-'.self::ASSET_CLASS;
38
+    const CACHE_TAG = 'twigpack-'.self::ASSET_CLASS;
39 39
 
40 40
     const DEVMODE_CACHE_DURATION = 1;
41 41
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         self::$config['server']['publicPath'] = $baseAssetsUrl;
103 103
         $useDevServer = getenv('NYS_PLUGIN_DEVSERVER');
104 104
         if ($useDevServer !== false) {
105
-            self::$config['useDevServer'] = (bool)$useDevServer;
105
+            self::$config['useDevServer'] = (bool) $useDevServer;
106 106
         }
107 107
     }
108 108
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public static function registerJsModules(array $modules)
117 117
     {
118 118
         $view = Craft::$app->getView();
119
-        foreach($modules as $module) {
119
+        foreach ($modules as $module) {
120 120
             $jsModule = self::getModule(self::$config, $module, 'modern');
121 121
             if ($jsModule) {
122 122
                 $view->registerJsFile($jsModule, [
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public static function registerCssModules(array $modules)
137 137
     {
138 138
         $view = Craft::$app->getView();
139
-        foreach($modules as $module) {
139
+        foreach ($modules as $module) {
140 140
             $cssModule = self::getModule(self::$config, $module, 'legacy');
141 141
             if ($cssModule) {
142 142
                 $view->registerCssFile($cssModule, [
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         // Resolve any aliases
364 364
         $alias = Craft::getAlias($path, false);
365 365
         if ($alias) {
366
-            $path = (string)$alias;
366
+            $path = (string) $alias;
367 367
         }
368 368
         // Make sure it's a full URL
369 369
         if (!UrlHelper::isAbsoluteUrl($path) && !is_file($path)) {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         $cache = Craft::$app->getCache();
407 407
         $file = $cache->getOrSet(
408 408
             self::CACHE_KEY.$path,
409
-            function () use ($path, $callback) {
409
+            function() use ($path, $callback) {
410 410
                 $result = null;
411 411
                 $contents = @file_get_contents($path);
412 412
                 if ($contents) {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     protected static function combinePaths(string ...$paths): string
437 437
     {
438 438
         $last_key = count($paths) - 1;
439
-        array_walk($paths, function (&$val, $key) use ($last_key) {
439
+        array_walk($paths, function(&$val, $key) use ($last_key) {
440 440
             switch ($key) {
441 441
                 case 0:
442 442
                     $val = rtrim($val, '/ ');
Please login to merge, or discard this patch.