This commit is contained in:
parent
037ed54ed9
commit
023e55c1bf
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -5,4 +5,7 @@
|
||||
"php.validate.executablePath": "/usr/local/bin/php",
|
||||
"php.validate.enable": true,
|
||||
"php.validate.run": "onType",
|
||||
}
|
||||
"[php]": {
|
||||
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user