diff --git a/composer.json b/composer.json index 063f133..c13f0d0 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ], "homepage": "https://github.com/noahnxt/laravel-open-holidays-api", "license": "MIT", - "version": "0.0.5", + "version": "1.0.0", "authors": [ { "name": "Noah Gillard", @@ -17,23 +17,22 @@ } ], "require": { - "php": "^8.1", - "illuminate/contracts": "^10.0", - "saloonphp/saloon": "^3.0", - "spatie/laravel-package-tools": "^1.14.0" + "php": "^8.2", + "spatie/laravel-package-tools": "^1.16", + "illuminate/contracts": "^10.0||^11.0" }, "require-dev": { - "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.8", - "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.8", - "pestphp/pest": "^2.20", - "pestphp/pest-plugin-arch": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/laravel-ray": "^1.26" + "laravel/pint": "^1.14", + "nunomaduro/collision": "^8.1.1||^7.10.0", + "larastan/larastan": "^2.9", + "orchestra/testbench": "^9.0.0||^8.22.0", + "pestphp/pest": "^2.34", + "pestphp/pest-plugin-arch": "^2.7", + "pestphp/pest-plugin-laravel": "^2.3", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "spatie/laravel-ray": "^1.35" }, "autoload": { "psr-4": { @@ -48,7 +47,7 @@ }, "scripts": { "post-autoload-dump": "@composer run prepare", - "clear": "@php vendor/bin/testbench package:purge-laravel-open-holidays-api --ansi", + "clear": "@php vendor/bin/testbench package:purge-skeleton --ansi", "prepare": "@php vendor/bin/testbench package:discover --ansi", "build": [ "@composer run prepare", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9914a5e..d8fd46c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,11 +2,9 @@ includes: - phpstan-baseline.neon parameters: - level: 4 + level: 5 paths: - src tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - checkMissingIterableValueType: false - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8053365..bfe434d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ - + tests - - - - - - - diff --git a/src/Requests/Holidays/PublicHolidays.php b/src/Requests/Holidays/PublicHolidays.php index 46b47f2..e866cfe 100644 --- a/src/Requests/Holidays/PublicHolidays.php +++ b/src/Requests/Holidays/PublicHolidays.php @@ -18,11 +18,11 @@ public function resolveEndpoint(): string } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $validFrom Start of the date range - * @param string $validTo End of the date range - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $validFrom Start of the date range + * @param string $validTo End of the date range + * @param string $subdivisionCode Code of the subdivision or empty */ public function __construct( protected string $countryIsoCode, @@ -30,8 +30,7 @@ public function __construct( protected string $validFrom, protected string $validTo, protected string $subdivisionCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Holidays/PublicHolidaysByDate.php b/src/Requests/Holidays/PublicHolidaysByDate.php index 4be5539..ab08e5a 100644 --- a/src/Requests/Holidays/PublicHolidaysByDate.php +++ b/src/Requests/Holidays/PublicHolidaysByDate.php @@ -18,14 +18,13 @@ public function resolveEndpoint(): string } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $date Date of interest + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $date Date of interest */ public function __construct( protected string $languageIsoCode, protected string $date, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Holidays/SchoolHolidays.php b/src/Requests/Holidays/SchoolHolidays.php index cc6e53a..548594f 100644 --- a/src/Requests/Holidays/SchoolHolidays.php +++ b/src/Requests/Holidays/SchoolHolidays.php @@ -18,11 +18,11 @@ public function resolveEndpoint(): string } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $validFrom Start of the date range - * @param string $validTo End of the date range - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $validFrom Start of the date range + * @param string $validTo End of the date range + * @param string $subdivisionCode Code of the subdivision or empty */ public function __construct( protected string $countryIsoCode, @@ -30,8 +30,7 @@ public function __construct( protected string $validFrom, protected string $validTo, protected string $subdivisionCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Holidays/SchoolHolidaysByDate.php b/src/Requests/Holidays/SchoolHolidaysByDate.php index 481d251..e56af87 100644 --- a/src/Requests/Holidays/SchoolHolidaysByDate.php +++ b/src/Requests/Holidays/SchoolHolidaysByDate.php @@ -18,14 +18,13 @@ public function resolveEndpoint(): string } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $date Date of interest + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $date Date of interest */ public function __construct( protected string $languageIsoCode, protected string $date, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Regional/Countries.php b/src/Requests/Regional/Countries.php index 29297bc..051a0a9 100644 --- a/src/Requests/Regional/Countries.php +++ b/src/Requests/Regional/Countries.php @@ -18,12 +18,11 @@ public function resolveEndpoint(): string } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function __construct( protected string $languageIsoCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Regional/Languages.php b/src/Requests/Regional/Languages.php index 6277a32..ec53c34 100644 --- a/src/Requests/Regional/Languages.php +++ b/src/Requests/Regional/Languages.php @@ -18,12 +18,11 @@ public function resolveEndpoint(): string } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function __construct( protected string $languageIsoCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Regional/Subdivisions.php b/src/Requests/Regional/Subdivisions.php index 5ff073e..31aa23c 100644 --- a/src/Requests/Regional/Subdivisions.php +++ b/src/Requests/Regional/Subdivisions.php @@ -18,14 +18,13 @@ public function resolveEndpoint(): string } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function __construct( protected string $countryIsoCode, protected string $languageIsoCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Statistics/StatisticsPublicHolidays.php b/src/Requests/Statistics/StatisticsPublicHolidays.php index 9f73ea2..43e0481 100644 --- a/src/Requests/Statistics/StatisticsPublicHolidays.php +++ b/src/Requests/Statistics/StatisticsPublicHolidays.php @@ -18,14 +18,13 @@ public function resolveEndpoint(): string } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $subdivisionCode Code of the subdivision or empty */ public function __construct( protected string $countryIsoCode, protected string $subdivisionCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Requests/Statistics/StatisticsSchoolHolidays.php b/src/Requests/Statistics/StatisticsSchoolHolidays.php index 612a4cb..8df9997 100644 --- a/src/Requests/Statistics/StatisticsSchoolHolidays.php +++ b/src/Requests/Statistics/StatisticsSchoolHolidays.php @@ -18,14 +18,13 @@ public function resolveEndpoint(): string } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $subdivisionCode Code of the subdivision or empty */ public function __construct( protected string $countryIsoCode, protected string $subdivisionCode, - ) { - } + ) {} public function defaultQuery(): array { diff --git a/src/Resource.php b/src/Resource.php index d555be4..9e17149 100644 --- a/src/Resource.php +++ b/src/Resource.php @@ -8,6 +8,5 @@ class Resource { public function __construct( protected Connector $connector, - ) { - } + ) {} } diff --git a/src/Resource/Holidays.php b/src/Resource/Holidays.php index 654d249..694d30e 100644 --- a/src/Resource/Holidays.php +++ b/src/Resource/Holidays.php @@ -12,11 +12,11 @@ class Holidays extends Resource { /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $validFrom Start of the date range - * @param string $validTo End of the date range - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $validFrom Start of the date range + * @param string $validTo End of the date range + * @param string $subdivisionCode Code of the subdivision or empty */ public function publicHolidays( string $countryIsoCode, @@ -30,8 +30,8 @@ public function publicHolidays( } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $date Date of interest + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $date Date of interest */ public function publicHolidaysByDate( string $languageIsoCode, @@ -41,11 +41,11 @@ public function publicHolidaysByDate( } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $validFrom Start of the date range - * @param string $validTo End of the date range - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $validFrom Start of the date range + * @param string $validTo End of the date range + * @param string $subdivisionCode Code of the subdivision or empty */ public function schoolHolidays( string $countryIsoCode, @@ -58,8 +58,8 @@ public function schoolHolidays( } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty - * @param string $date Date of interest + * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $date Date of interest */ public function schoolHolidaysByDate( string $languageIsoCode, diff --git a/src/Resource/Regional.php b/src/Resource/Regional.php index 8cbf6cd..27fb009 100644 --- a/src/Resource/Regional.php +++ b/src/Resource/Regional.php @@ -11,7 +11,7 @@ class Regional extends Resource { /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function countries(string $languageIsoCode): Response { @@ -19,7 +19,7 @@ public function countries(string $languageIsoCode): Response } /** - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function languages(string $languageIsoCode): Response { @@ -27,8 +27,8 @@ public function languages(string $languageIsoCode): Response } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $languageIsoCode ISO-639-1 code of a language or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $languageIsoCode ISO-639-1 code of a language or empty */ public function subdivisions( string $countryIsoCode, diff --git a/src/Resource/Statistics.php b/src/Resource/Statistics.php index 8f77877..8d9d434 100644 --- a/src/Resource/Statistics.php +++ b/src/Resource/Statistics.php @@ -10,8 +10,8 @@ class Statistics extends Resource { /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $subdivisionCode Code of the subdivision or empty */ public function statisticsPublicHolidays( string $countryIsoCode, @@ -21,8 +21,8 @@ public function statisticsPublicHolidays( } /** - * @param string $countryIsoCode ISO 3166-1 code of the country - * @param string $subdivisionCode Code of the subdivision or empty + * @param string $countryIsoCode ISO 3166-1 code of the country + * @param string $subdivisionCode Code of the subdivision or empty */ public function statisticsSchoolHolidays( string $countryIsoCode,