From 023e55c1bf9b51990f657d247233355d89102648 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 12 Jan 2024 12:26:11 +0000 Subject: [PATCH] formatter --- .vscode/settings.json | 5 ++++- src/MultiDownloaderClient.php | 4 ++-- tests/MultiDownloaderClientTest.php | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a912154..5b973fb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,4 +5,7 @@ "php.validate.executablePath": "/usr/local/bin/php", "php.validate.enable": true, "php.validate.run": "onType", -} \ No newline at end of file + "[php]": { + "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" + } +} diff --git a/src/MultiDownloaderClient.php b/src/MultiDownloaderClient.php index 7599982..ec53b6d 100644 --- a/src/MultiDownloaderClient.php +++ b/src/MultiDownloaderClient.php @@ -27,7 +27,7 @@ class MultiDownloaderClient throw new \InvalidArgumentException('API key is required'); } $this->apiKey = $apiKey; - + $apiSecret = $options['apiSecret'] ?? getenv('MULTI_DOWNLOADER_SECRET_KEY'); if (!$apiSecret) { throw new \InvalidArgumentException('API secret key is required'); @@ -41,7 +41,7 @@ class MultiDownloaderClient { $this->files = []; $this->addFiles($files); - + return $this; } diff --git a/tests/MultiDownloaderClientTest.php b/tests/MultiDownloaderClientTest.php index 364313a..2f4c318 100644 --- a/tests/MultiDownloaderClientTest.php +++ b/tests/MultiDownloaderClientTest.php @@ -22,7 +22,7 @@ class MultiDownloaderClientTest extends TestCase public function testDownloadAsString() { - $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]); + $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']); $client->setFiles($this->testFiles()); @@ -35,7 +35,7 @@ class MultiDownloaderClientTest extends TestCase public function testDownloadTo() { - $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]); + $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']); $path = sys_get_temp_dir() . '/testDownloadTo.zip'; @@ -50,7 +50,7 @@ class MultiDownloaderClientTest extends TestCase public function testForm() { - $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]); + $client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']); $client->setFiles($this->testFiles()); echo $client->htmlForm($this->testFiles());