diff --git a/src/Command/DownloadCommand.php b/src/Command/DownloadCommand.php index 13dcb5f..efb049e 100644 --- a/src/Command/DownloadCommand.php +++ b/src/Command/DownloadCommand.php @@ -27,10 +27,9 @@ class DownloadCommand extends AbstractCommand public function __invoke(): int { $identifier = $this->input->getArgument('identifier'); - [$space, $identifier] = explode('/', $identifier); $version = $this->input->getArgument('version'); $appStoreService = ApplicationContext::getContainer()->get(AppStoreService::class); - $appStoreService->download($space, $identifier, $version); + $appStoreService->download($identifier, $version); $this->output->success('Plugin Downloaded Successfully'); return AbstractCommand::SUCCESS; } diff --git a/src/Service/AppStoreService.php b/src/Service/AppStoreService.php index b2fcfc5..3b16fe7 100644 --- a/src/Service/AppStoreService.php +++ b/src/Service/AppStoreService.php @@ -25,7 +25,7 @@ public function request(string $uri, array $data = []): array; /** * Download the specified plug-in to a local directory. */ - public function download(string $space, string $identifier, string $version): bool; + public function download(string $identifier, string $version): bool; /** * Get the details of the specified plugin. diff --git a/src/Service/Impl/AppStoreServiceImpl.php b/src/Service/Impl/AppStoreServiceImpl.php index ac2a404..6cdc1a4 100644 --- a/src/Service/Impl/AppStoreServiceImpl.php +++ b/src/Service/Impl/AppStoreServiceImpl.php @@ -92,7 +92,7 @@ public function getOtherApp(string $username): array /** * Download the specified plug-in to a local directory. */ - public function download(string $space, string $identifier, string $version): bool + public function download(string $identifier, string $version): bool { $localPluginPath = Plugin::PLUGIN_PATH . DIRECTORY_SEPARATOR . $identifier; if (file_exists($localPluginPath)) { @@ -100,7 +100,7 @@ public function download(string $space, string $identifier, string $version): bo } $originData = $this->request(__FUNCTION__, [ - 'identifier' => $space . '/' . $identifier, + 'identifier' => $identifier, 'version' => $version, ]); $downloadResponse = Collection::make($originData);