diff --git a/src/Exceptions/VatSenseApiError.php b/src/Exceptions/VatSenseApiError.php index 343feea..bf0eb3b 100644 --- a/src/Exceptions/VatSenseApiError.php +++ b/src/Exceptions/VatSenseApiError.php @@ -8,11 +8,11 @@ final class VatSenseApiError extends Exception { public static function get(string $query, $error): self { - return new static("{$error['title']}: The query `{$query}` failed with error details: `{$error['detail']}`."); + return new self("{$error['title']}: The query `{$query}` failed with error details: `{$error['detail']}`."); } public static function invalidConfig(string $string): self { - return new static('Invalid configuration. The key `{string}` is required.'); + return new self('Invalid configuration. The key `{string}` is required.'); } } diff --git a/src/Exceptions/VatSenseException.php b/src/Exceptions/VatSenseException.php index a20cf47..e14e23b 100644 --- a/src/Exceptions/VatSenseException.php +++ b/src/Exceptions/VatSenseException.php @@ -8,6 +8,6 @@ final class VatSenseException extends Exception { public static function invalidConfig(string $string): self { - return new static('Invalid configuration. The key `{string}` is required.'); + return new self('Invalid configuration. The key `{string}` is required.'); } } diff --git a/src/Vatsense.php b/src/Vatsense.php index 7b26c86..63fdf9f 100755 --- a/src/Vatsense.php +++ b/src/Vatsense.php @@ -11,9 +11,6 @@ */ class Vatsense { - /** - * @var string - */ protected string $baseUrl = 'https://api.vatsense.com/1.0/'; public function __construct() @@ -26,8 +23,6 @@ public function __construct() /** * Function get. * - * @param string $endpoint - * @param array $args * @return array|mixed * * @throws VatSenseApiError @@ -60,8 +55,6 @@ public function allRates(): mixed /** * Function filterRates. * - * @param string|null $country_code - * @param string|null $ip_address * @return array|mixed * * @throws VatSenseApiError @@ -86,10 +79,6 @@ public function allRateTypes(): mixed /** * Function findRate. * - * @param string|null $country_code - * @param string|null $ip_address - * @param bool|null $eu - * @param string|null $type * @return array|mixed * * @throws VatSenseApiError @@ -102,10 +91,6 @@ public function findRate(?string $country_code = null, ?string $ip_address = nul /** * Function quickRate. * - * @param string|null $country_code - * @param string|null $ip_address - * @param bool|null $eu - * @param string|null $type * @return array|mixed * * @throws VatSenseApiError @@ -130,8 +115,6 @@ public function allCountries(): mixed /** * Function filterCountries. * - * @param string|null $country_code - * @param string|null $ip_address * @return array|mixed * * @throws VatSenseApiError @@ -144,8 +127,6 @@ public function filterCountries(?string $country_code = null, ?string $ip_addres /** * Function validateVatNumber. * - * @param string $vat_number - * @param string|null $requester * @return array|mixed * * @throws VatSenseApiError