diff --git a/src/AfipCmsSigner.php b/src/AfipCmsSigner.php index 87af523..f00e3c3 100644 --- a/src/AfipCmsSigner.php +++ b/src/AfipCmsSigner.php @@ -15,7 +15,7 @@ class AfipCmsSigner private ?string $private_key_passphrase; - public function __construct(string $certificate, string $private_key, string $private_key_passphrase = null) + public function __construct(string $certificate, string $private_key, ?string $private_key_passphrase = null) { $this->certificate = $certificate; $this->private_key = $private_key; diff --git a/src/AfipConfiguration.php b/src/AfipConfiguration.php index 78ea230..a21b2fd 100644 --- a/src/AfipConfiguration.php +++ b/src/AfipConfiguration.php @@ -16,7 +16,7 @@ class AfipConfiguration private AfipCmsSigner $signer; - public function __construct(string $cuit = null, string $certificate = null, string $private_key = null, string $private_key_passphrase = null, bool $production_mode = true) + public function __construct(?string $cuit = null, ?string $certificate = null, ?string $private_key = null, ?string $private_key_passphrase = null, bool $production_mode = true) { $this->cuit = $cuit ?? config('afip.cuit'); $this->certificate = $certificate ?? config('afip.certificate'); diff --git a/src/LaravelAfip.php b/src/LaravelAfip.php index d32dea1..ef607ba 100755 --- a/src/LaravelAfip.php +++ b/src/LaravelAfip.php @@ -8,17 +8,17 @@ class LaravelAfip { - public function auth(AfipConfiguration $configuration = null): AuthenticationWebService + public function auth(?AfipConfiguration $configuration = null): AuthenticationWebService { return new AuthenticationWebService($configuration); } - public function billing(AfipConfiguration $configuration = null): ElectronicBillingWebService + public function billing(?AfipConfiguration $configuration = null): ElectronicBillingWebService { return new ElectronicBillingWebService($configuration); } - public function padron(AfipConfiguration $configuration = null): PadronWebService + public function padron(?AfipConfiguration $configuration = null): PadronWebService { return new PadronWebService($configuration); } diff --git a/src/WebServices/AuthenticationWebService.php b/src/WebServices/AuthenticationWebService.php index d394d70..af69067 100644 --- a/src/WebServices/AuthenticationWebService.php +++ b/src/WebServices/AuthenticationWebService.php @@ -12,7 +12,7 @@ class AuthenticationWebService private AfipClient $client; - public function __construct(AfipConfiguration $configuration = null) + public function __construct(?AfipConfiguration $configuration = null) { $this->configuration = $configuration ?? new AfipConfiguration(); diff --git a/src/WebServices/ElectronicBillingWebService.php b/src/WebServices/ElectronicBillingWebService.php index d8023ed..4a05515 100644 --- a/src/WebServices/ElectronicBillingWebService.php +++ b/src/WebServices/ElectronicBillingWebService.php @@ -18,7 +18,7 @@ class ElectronicBillingWebService private AfipClient $client; - public function __construct(AfipConfiguration $configuration = null) + public function __construct(?AfipConfiguration $configuration = null) { $this->configuration = $configuration ?? new AfipConfiguration(); diff --git a/src/WebServices/PadronWebService.php b/src/WebServices/PadronWebService.php index d75f2c3..374f43a 100644 --- a/src/WebServices/PadronWebService.php +++ b/src/WebServices/PadronWebService.php @@ -23,7 +23,7 @@ class PadronWebService private AfipClient $padron13Client; - public function __construct(AfipConfiguration $configuration = null) + public function __construct(?AfipConfiguration $configuration = null) { $this->configuration = $configuration ?? new AfipConfiguration();