@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | $dirPrefix = CRAFT_TEMPLATES_PATH; |
148 | 148 | } |
149 | 149 | $name = strstr($name, $dirPrefix); |
150 | - $name = (string)str_replace($dirPrefix, '', $name); |
|
150 | + $name = (string) str_replace($dirPrefix, '', $name); |
|
151 | 151 | $path = self::combinePaths( |
152 | 152 | $config['localFiles']['basePath'], |
153 | 153 | $config['localFiles']['criticalPrefix'], |
154 | 154 | $name |
155 | - ) . $config['localFiles']['criticalSuffix']; |
|
155 | + ).$config['localFiles']['criticalSuffix']; |
|
156 | 156 | |
157 | 157 | return self::getCssInlineTags($path, $attributes); |
158 | 158 | } |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | $dependency = new TagDependency([ |
560 | 560 | 'tags' => [ |
561 | 561 | self::CACHE_TAG, |
562 | - self::CACHE_TAG . $path, |
|
562 | + self::CACHE_TAG.$path, |
|
563 | 563 | ], |
564 | 564 | ]); |
565 | 565 | // If this is a file path such as for the `manifest.json`, add a FileDependency so it's cache bust if the file changes |
@@ -586,8 +586,8 @@ discard block |
||
586 | 586 | $settings = Twigpack::$plugin->getSettings(); |
587 | 587 | $cacheKeySuffix = $settings->cacheKeySuffix ?? ''; |
588 | 588 | $file = $cache->getOrSet( |
589 | - self::CACHE_KEY . $cacheKeySuffix . $path, |
|
590 | - function () use ($path, $callback) { |
|
589 | + self::CACHE_KEY.$cacheKeySuffix.$path, |
|
590 | + function() use ($path, $callback) { |
|
591 | 591 | $result = null; |
592 | 592 | $contents = null; |
593 | 593 | if (UrlHelper::isAbsoluteUrl($path)) { |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | protected static function combinePaths(string ...$paths): string |
658 | 658 | { |
659 | 659 | $last_key = count($paths) - 1; |
660 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
660 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
661 | 661 | switch ($key) { |
662 | 662 | case 0: |
663 | 663 | $val = rtrim($val, '/ '); |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | $cspNonceType = self::getCspNonceType(); |
712 | 712 | if ($cspNonceType) { |
713 | 713 | $cspValue = "{$cspDirective} 'nonce-$nonce'"; |
714 | - foreach(self::CSP_HEADERS as $cspHeader) { |
|
714 | + foreach (self::CSP_HEADERS as $cspHeader) { |
|
715 | 715 | switch ($cspNonceType) { |
716 | 716 | case 'tag': |
717 | 717 | Craft::$app->getView()->registerMetaTag([ |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | ]); |
721 | 721 | break; |
722 | 722 | case 'header': |
723 | - Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';'); |
|
723 | + Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';'); |
|
724 | 724 | break; |
725 | 725 | default: |
726 | 726 | break; |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | { |
767 | 767 | $json = JsonHelper::decodeIfJson($string); |
768 | 768 | if (is_string($json)) { |
769 | - Craft::error('Error decoding JSON file: ' . $json, __METHOD__); |
|
769 | + Craft::error('Error decoding JSON file: '.$json, __METHOD__); |
|
770 | 770 | $json = null; |
771 | 771 | } |
772 | 772 |