@@ -138,12 +138,12 @@ discard block |
||
| 138 | 138 | $dirPrefix = CRAFT_TEMPLATES_PATH; |
| 139 | 139 | } |
| 140 | 140 | $name = strstr($name, $dirPrefix); |
| 141 | - $name = (string)str_replace($dirPrefix, '', $name); |
|
| 141 | + $name = (string) str_replace($dirPrefix, '', $name); |
|
| 142 | 142 | $path = self::combinePaths( |
| 143 | 143 | $config['localFiles']['basePath'], |
| 144 | 144 | $config['localFiles']['criticalPrefix'], |
| 145 | 145 | $name |
| 146 | - ) . $config['localFiles']['criticalSuffix']; |
|
| 146 | + ).$config['localFiles']['criticalSuffix']; |
|
| 147 | 147 | |
| 148 | 148 | return self::getCssInlineTags($path); |
| 149 | 149 | } |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | $dependency = new TagDependency([ |
| 540 | 540 | 'tags' => [ |
| 541 | 541 | self::CACHE_TAG, |
| 542 | - self::CACHE_TAG . $path, |
|
| 542 | + self::CACHE_TAG.$path, |
|
| 543 | 543 | ], |
| 544 | 544 | ]); |
| 545 | 545 | // Set the cache duration based on devMode |
@@ -555,8 +555,8 @@ discard block |
||
| 555 | 555 | $settings = Twigpack::$plugin->getSettings(); |
| 556 | 556 | $cacheKeySuffix = $settings->cacheKeySuffix ?? ''; |
| 557 | 557 | $file = $cache->getOrSet( |
| 558 | - self::CACHE_KEY . $cacheKeySuffix . $path, |
|
| 559 | - function () use ($path, $callback) { |
|
| 558 | + self::CACHE_KEY.$cacheKeySuffix.$path, |
|
| 559 | + function() use ($path, $callback) { |
|
| 560 | 560 | $result = null; |
| 561 | 561 | if (UrlHelper::isAbsoluteUrl($path)) { |
| 562 | 562 | /** |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | protected static function combinePaths(string ...$paths): string |
| 607 | 607 | { |
| 608 | 608 | $last_key = count($paths) - 1; |
| 609 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
| 609 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
| 610 | 610 | switch ($key) { |
| 611 | 611 | case 0: |
| 612 | 612 | $val = rtrim($val, '/ '); |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | $cspNonceType = self::getCspNonceType(); |
| 661 | 661 | if ($cspNonceType) { |
| 662 | 662 | $cspValue = "{$cspDirective} 'nonce-$nonce'"; |
| 663 | - foreach(self::CSP_HEADERS as $cspHeader) { |
|
| 663 | + foreach (self::CSP_HEADERS as $cspHeader) { |
|
| 664 | 664 | switch ($cspNonceType) { |
| 665 | 665 | case 'tag': |
| 666 | 666 | Craft::$app->getView()->registerMetaTag([ |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | ]); |
| 670 | 670 | break; |
| 671 | 671 | case 'header': |
| 672 | - Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';'); |
|
| 672 | + Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';'); |
|
| 673 | 673 | break; |
| 674 | 674 | default: |
| 675 | 675 | break; |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | { |
| 716 | 716 | $json = JsonHelper::decodeIfJson($string); |
| 717 | 717 | if (is_string($json)) { |
| 718 | - Craft::error('Error decoding JSON file: ' . $json, __METHOD__); |
|
| 718 | + Craft::error('Error decoding JSON file: '.$json, __METHOD__); |
|
| 719 | 719 | $json = null; |
| 720 | 720 | } |
| 721 | 721 | |