@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'errorEntry' => '', |
| 33 | 33 | // String to be appended to the cache key |
| 34 | 34 | 'cacheKeySuffix' => '', |
| 35 | - // Manifest file names |
|
| 35 | + // Manifest file names |
|
| 36 | 36 | 'manifest' => [ |
| 37 | 37 | 'legacy' => 'manifest-legacy.json', |
| 38 | 38 | 'modern' => 'manifest.json', |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | |
| 6 | 6 | return static function(ECSConfig $ecsConfig): void { |
| 7 | 7 | $ecsConfig->paths([ |
| 8 | - __DIR__ . '/src', |
|
| 8 | + __DIR__.'/src', |
|
| 9 | 9 | __FILE__, |
| 10 | 10 | ]); |
| 11 | 11 | $ecsConfig->parallel(); |
@@ -150,12 +150,12 @@ discard block |
||
| 150 | 150 | $dirPrefix = CRAFT_TEMPLATES_PATH; |
| 151 | 151 | } |
| 152 | 152 | $name = strstr($name, $dirPrefix); |
| 153 | - $name = (string)str_replace($dirPrefix, '', $name); |
|
| 153 | + $name = (string) str_replace($dirPrefix, '', $name); |
|
| 154 | 154 | $path = self::combinePaths( |
| 155 | 155 | $config['localFiles']['basePath'], |
| 156 | 156 | $config['localFiles']['criticalPrefix'], |
| 157 | 157 | $name |
| 158 | - ) . $config['localFiles']['criticalSuffix']; |
|
| 158 | + ).$config['localFiles']['criticalSuffix']; |
|
| 159 | 159 | |
| 160 | 160 | return self::getCssInlineTags($path, $attributes); |
| 161 | 161 | } |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | $dependency = new TagDependency([ |
| 570 | 570 | 'tags' => [ |
| 571 | 571 | self::CACHE_TAG, |
| 572 | - self::CACHE_TAG . $path, |
|
| 572 | + self::CACHE_TAG.$path, |
|
| 573 | 573 | ], |
| 574 | 574 | ]); |
| 575 | 575 | // If this is a file path such as for the `manifest.json`, add a FileDependency so it's cache bust if the file changes |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $settings = Twigpack::$plugin->getSettings(); |
| 593 | 593 | $cacheKeySuffix = $settings->cacheKeySuffix ?? ''; |
| 594 | 594 | $file = $cache->getOrSet( |
| 595 | - self::CACHE_KEY . $cacheKeySuffix . $path, |
|
| 595 | + self::CACHE_KEY.$cacheKeySuffix.$path, |
|
| 596 | 596 | function() use ($path, $callback) { |
| 597 | 597 | $result = null; |
| 598 | 598 | $contents = null; |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | * @param $context |
| 652 | 652 | * @return false|string |
| 653 | 653 | */ |
| 654 | - protected static function getHttpResponseCode($url, $context): bool|string |
|
| 654 | + protected static function getHttpResponseCode($url, $context): bool | string |
|
| 655 | 655 | { |
| 656 | 656 | $headers = @get_headers($url, false, $context); |
| 657 | 657 | if (empty($headers)) { |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | ]); |
| 735 | 735 | break; |
| 736 | 736 | case 'header': |
| 737 | - Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';'); |
|
| 737 | + Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';'); |
|
| 738 | 738 | break; |
| 739 | 739 | default: |
| 740 | 740 | break; |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | { |
| 782 | 782 | $json = JsonHelper::decodeIfJson($string); |
| 783 | 783 | if (is_string($json)) { |
| 784 | - Craft::error('Error decoding JSON file: ' . $json, __METHOD__); |
|
| 784 | + Craft::error('Error decoding JSON file: '.$json, __METHOD__); |
|
| 785 | 785 | $json = null; |
| 786 | 786 | } |
| 787 | 787 | |
@@ -204,7 +204,7 @@ |
||
| 204 | 204 | Event::on( |
| 205 | 205 | UpController::class, |
| 206 | 206 | UpController::EVENT_AFTER_UP, |
| 207 | - function (CancelableEvent $event) { |
|
| 207 | + function(CancelableEvent $event) { |
|
| 208 | 208 | $this->clearAllCaches(); |
| 209 | 209 | } |
| 210 | 210 | ); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @var array|string The JavaScript entry from the manifest.json to inject on |
| 39 | 39 | * Twig error pages |
| 40 | 40 | */ |
| 41 | - public array|string $errorEntry = ''; |
|
| 41 | + public array | string $errorEntry = ''; |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * @var string String to be appended to the cache key |