@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | $dirPrefix = CRAFT_TEMPLATES_PATH; |
142 | 142 | } |
143 | 143 | $name = strstr($name, $dirPrefix); |
144 | - $name = (string)str_replace($dirPrefix, '', $name); |
|
144 | + $name = (string) str_replace($dirPrefix, '', $name); |
|
145 | 145 | $path = self::combinePaths( |
146 | 146 | $config['localFiles']['basePath'], |
147 | 147 | $config['localFiles']['criticalPrefix'], |
148 | 148 | $name |
149 | - ) . $config['localFiles']['criticalSuffix']; |
|
149 | + ).$config['localFiles']['criticalSuffix']; |
|
150 | 150 | |
151 | 151 | return self::getCssInlineTags($path, $attributes); |
152 | 152 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $dependency = new TagDependency([ |
547 | 547 | 'tags' => [ |
548 | 548 | self::CACHE_TAG, |
549 | - self::CACHE_TAG . $path, |
|
549 | + self::CACHE_TAG.$path, |
|
550 | 550 | ], |
551 | 551 | ]); |
552 | 552 | // Set the cache duration based on devMode |
@@ -562,8 +562,8 @@ discard block |
||
562 | 562 | $settings = Twigpack::$plugin->getSettings(); |
563 | 563 | $cacheKeySuffix = $settings->cacheKeySuffix ?? ''; |
564 | 564 | $file = $cache->getOrSet( |
565 | - self::CACHE_KEY . $cacheKeySuffix . $path, |
|
566 | - function () use ($path, $callback) { |
|
565 | + self::CACHE_KEY.$cacheKeySuffix.$path, |
|
566 | + function() use ($path, $callback) { |
|
567 | 567 | $result = null; |
568 | 568 | if (UrlHelper::isAbsoluteUrl($path)) { |
569 | 569 | /** |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | protected static function combinePaths(string ...$paths): string |
614 | 614 | { |
615 | 615 | $last_key = count($paths) - 1; |
616 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
616 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
617 | 617 | switch ($key) { |
618 | 618 | case 0: |
619 | 619 | $val = rtrim($val, '/ '); |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | $cspNonceType = self::getCspNonceType(); |
668 | 668 | if ($cspNonceType) { |
669 | 669 | $cspValue = "{$cspDirective} 'nonce-$nonce'"; |
670 | - foreach(self::CSP_HEADERS as $cspHeader) { |
|
670 | + foreach (self::CSP_HEADERS as $cspHeader) { |
|
671 | 671 | switch ($cspNonceType) { |
672 | 672 | case 'tag': |
673 | 673 | Craft::$app->getView()->registerMetaTag([ |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | ]); |
677 | 677 | break; |
678 | 678 | case 'header': |
679 | - Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';'); |
|
679 | + Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';'); |
|
680 | 680 | break; |
681 | 681 | default: |
682 | 682 | break; |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | { |
723 | 723 | $json = JsonHelper::decodeIfJson($string); |
724 | 724 | if (is_string($json)) { |
725 | - Craft::error('Error decoding JSON file: ' . $json, __METHOD__); |
|
725 | + Craft::error('Error decoding JSON file: '.$json, __METHOD__); |
|
726 | 726 | $json = null; |
727 | 727 | } |
728 | 728 |