Compatibilité PHP 7
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Nicolas COMPAIN 2024-01-12 10:04:08 +00:00
parent de205f9870
commit 4e2db2f71c
4 changed files with 17 additions and 9 deletions

8
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
"intelephense.environment.phpVersion": "7.0",
"php.version": "v7.0",
"php.completion.autoimport": "auto-import",
"php.validate.executablePath": "/usr/local/bin/php",
"php.validate.enable": true,
"php.validate.run": "onType",
}

View File

@ -15,7 +15,7 @@
} }
], ],
"require": { "require": {
"php": ">=8.2" "php": ">=7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "*", "phpunit/phpunit": "*",

View File

@ -4,8 +4,8 @@ namespace Nwb\MultiDownloaderClient;
class FileRequest class FileRequest
{ {
private string $url; private $url;
private ?string $fallbackUrl; private $fallbackUrl;
public function __construct(string $url, string $fallbackUrl = null) public function __construct(string $url, string $fallbackUrl = null)
{ {
@ -32,7 +32,7 @@ class FileRequest
return $this->url; return $this->url;
} }
public function getFallbackUrl(): ?string public function getFallbackUrl(): string
{ {
return $this->fallbackUrl; return $this->fallbackUrl;
} }

View File

@ -4,11 +4,11 @@ namespace Nwb\MultiDownloaderClient;
class MultiDownloaderClient class MultiDownloaderClient
{ {
private string $url; private $url;
private string $apiKey; private $apiKey;
private string $apiSecret; private $apiSecret;
private array $files = []; private $files = [];
/** /**
* Constructeur pour initialiser la classe avec des options spécifiques. * Constructeur pour initialiser la classe avec des options spécifiques.
* *