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.executablePath": "/usr/local/bin/php",
|
||||||
"php.validate.enable": true,
|
"php.validate.enable": true,
|
||||||
"php.validate.run": "onType",
|
"php.validate.run": "onType",
|
||||||
}
|
"[php]": {
|
||||||
|
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -27,7 +27,7 @@ class MultiDownloaderClient
|
|||||||
throw new \InvalidArgumentException('API key is required');
|
throw new \InvalidArgumentException('API key is required');
|
||||||
}
|
}
|
||||||
$this->apiKey = $apiKey;
|
$this->apiKey = $apiKey;
|
||||||
|
|
||||||
$apiSecret = $options['apiSecret'] ?? getenv('MULTI_DOWNLOADER_SECRET_KEY');
|
$apiSecret = $options['apiSecret'] ?? getenv('MULTI_DOWNLOADER_SECRET_KEY');
|
||||||
if (!$apiSecret) {
|
if (!$apiSecret) {
|
||||||
throw new \InvalidArgumentException('API secret key is required');
|
throw new \InvalidArgumentException('API secret key is required');
|
||||||
@ -41,7 +41,7 @@ class MultiDownloaderClient
|
|||||||
{
|
{
|
||||||
$this->files = [];
|
$this->files = [];
|
||||||
$this->addFiles($files);
|
$this->addFiles($files);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class MultiDownloaderClientTest extends TestCase
|
|||||||
|
|
||||||
public function testDownloadAsString()
|
public function testDownloadAsString()
|
||||||
{
|
{
|
||||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]);
|
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||||
|
|
||||||
$client->setFiles($this->testFiles());
|
$client->setFiles($this->testFiles());
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class MultiDownloaderClientTest extends TestCase
|
|||||||
|
|
||||||
public function testDownloadTo()
|
public function testDownloadTo()
|
||||||
{
|
{
|
||||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]);
|
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||||
|
|
||||||
$path = sys_get_temp_dir() . '/testDownloadTo.zip';
|
$path = sys_get_temp_dir() . '/testDownloadTo.zip';
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class MultiDownloaderClientTest extends TestCase
|
|||||||
|
|
||||||
public function testForm()
|
public function testForm()
|
||||||
{
|
{
|
||||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test' ]);
|
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||||
$client->setFiles($this->testFiles());
|
$client->setFiles($this->testFiles());
|
||||||
|
|
||||||
echo $client->htmlForm($this->testFiles());
|
echo $client->htmlForm($this->testFiles());
|
||||||
|
Loading…
Reference in New Issue
Block a user