From 9a5055f2edcefff511d0fc4a3a9ff635f8ba2083 Mon Sep 17 00:00:00 2001 From: Jack Wilkinson Date: Sat, 4 Jan 2025 19:13:33 +0000 Subject: [PATCH] Added style fixes --- .../system/classes/extensions/ExtensionManagerInterface.php | 2 +- modules/system/classes/extensions/ModuleManager.php | 1 - modules/system/classes/extensions/PluginManager.php | 4 +--- modules/system/classes/extensions/source/ExtensionSource.php | 3 ++- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/system/classes/extensions/ExtensionManagerInterface.php b/modules/system/classes/extensions/ExtensionManagerInterface.php index 61ca53c8c..bbc813b7f 100644 --- a/modules/system/classes/extensions/ExtensionManagerInterface.php +++ b/modules/system/classes/extensions/ExtensionManagerInterface.php @@ -44,7 +44,7 @@ public function create(string $extension): WinterExtension; * * @throws ApplicationException If the installation fails */ - public function install(ExtensionSource|WinterExtension|string $extension ): WinterExtension; + public function install(ExtensionSource|WinterExtension|string $extension): WinterExtension; /** * Validates if an extension is installed or not diff --git a/modules/system/classes/extensions/ModuleManager.php b/modules/system/classes/extensions/ModuleManager.php index 9d623aa1e..6e402d54d 100644 --- a/modules/system/classes/extensions/ModuleManager.php +++ b/modules/system/classes/extensions/ModuleManager.php @@ -116,7 +116,6 @@ public function update(WinterExtension|string|null $extension = null, bool $migr $versions ? $this->renderComponent(Info::class, sprintf('Updated module %s (%s) from v%s => v%s', $module, $composerPackage, $versions[0], $versions[1])) : $this->renderComponent(Error::class, sprintf('Failed to module %s (%s)', $module, $composerPackage)); - } elseif (false /* Detect if market */) { Preserver::instance()->store($extension); // @TODO: Update files from market diff --git a/modules/system/classes/extensions/PluginManager.php b/modules/system/classes/extensions/PluginManager.php index 31a40edfc..15292a9f2 100644 --- a/modules/system/classes/extensions/PluginManager.php +++ b/modules/system/classes/extensions/PluginManager.php @@ -330,9 +330,7 @@ public function update(WinterExtension|string|null $extension = null, bool $migr 'Failed to update plugin %s (%s)', $pluginName, $code - ) - ); - + )); } elseif (false /* Detect if market */) { Preserver::instance()->store($plugin); // @TODO: Update files from market diff --git a/modules/system/classes/extensions/source/ExtensionSource.php b/modules/system/classes/extensions/source/ExtensionSource.php index 549a4a986..a8b59ce3b 100644 --- a/modules/system/classes/extensions/source/ExtensionSource.php +++ b/modules/system/classes/extensions/source/ExtensionSource.php @@ -276,7 +276,8 @@ protected function guessCodeFromPath(string $path): ?string str_starts_with($path, plugins_path()) ? Str::after($path, basename(plugins_path())) : $this->guessCodeFromPlugin($path), - '/')), + '/' + )), static::TYPE_THEME, static::TYPE_MODULE => basename($path), default => null, };