@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * @var string The public URL to use when not using the dev server |
| 46 | 46 | */ |
| 47 | - 'serverPublic' => App::env('PRIMARY_SITE_URL') . '/dist/', |
|
| 47 | + 'serverPublic' => App::env('PRIMARY_SITE_URL').'/dist/', |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @var string The JavaScript entry from the manifest.json to inject on Twig error pages |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | |
| 27 | 27 | return [ |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @var bool Should the dev server be used? |
|
| 31 | - */ |
|
| 29 | + /** |
|
| 30 | + * @var bool Should the dev server be used? |
|
| 31 | + */ |
|
| 32 | 32 | 'useDevServer' => App::env('ENVIRONMENT') === 'dev', |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | $dirPrefix = CRAFT_TEMPLATES_PATH; |
| 50 | 50 | } |
| 51 | 51 | $name = strstr($name, $dirPrefix); |
| 52 | - $name = (string)str_replace($dirPrefix, '', $name); |
|
| 52 | + $name = (string) str_replace($dirPrefix, '', $name); |
|
| 53 | 53 | $path = self::combinePaths( |
| 54 | 54 | $config['localFiles']['basePath'], |
| 55 | 55 | $config['localFiles']['criticalPrefix'], |
| 56 | 56 | $name |
| 57 | - ) . $config['localFiles']['criticalSuffix']; |
|
| 57 | + ).$config['localFiles']['criticalSuffix']; |
|
| 58 | 58 | |
| 59 | 59 | return self::getCssInlineTags($path, $attributes); |
| 60 | 60 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected function combinePaths(string ...$paths): string |
| 77 | 77 | { |
| 78 | 78 | $last_key = count($paths) - 1; |
| 79 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
| 79 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
| 80 | 80 | switch ($key) { |
| 81 | 81 | case 0: |
| 82 | 82 | $val = rtrim($val, '/ '); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | $viteAttrs |
| 106 | 106 | )); |
| 107 | 107 | } |
| 108 | - // Log that the plugin has loaded |
|
| 108 | + // Log that the plugin has loaded |
|
| 109 | 109 | Craft::info( |
| 110 | 110 | Craft::t( |
| 111 | 111 | 'vite', |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | Event::on( |
| 138 | 138 | CraftVariable::class, |
| 139 | 139 | CraftVariable::EVENT_INIT, |
| 140 | - function (Event $event) { |
|
| 140 | + function(Event $event) { |
|
| 141 | 141 | /** @var CraftVariable $variable */ |
| 142 | 142 | $variable = $event->sender; |
| 143 | 143 | $variable->set('vite', [ |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | Event::on( |
| 151 | 151 | ClearCaches::class, |
| 152 | 152 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
| 153 | - function (RegisterCacheOptionsEvent $event) { |
|
| 153 | + function(RegisterCacheOptionsEvent $event) { |
|
| 154 | 154 | Craft::debug( |
| 155 | 155 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
| 156 | 156 | __METHOD__ |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | Event::on( |
| 168 | 168 | View::class, |
| 169 | 169 | View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE, |
| 170 | - function (TemplateEvent $event) { |
|
| 170 | + function(TemplateEvent $event) { |
|
| 171 | 171 | self::$templateName = $event->template; |
| 172 | 172 | } |
| 173 | 173 | ); |