diff --git a/CHANGELOG.md b/CHANGELOG.md index fc71b7a..1fdad83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ### Changed * Update shlinkio coding standard to v2.4 * Add default values to `Location` constructor params, making it easier to handle with named parameters. +* Update to PHPStan 2.0 ### Deprecated * *Nothing* diff --git a/composer.json b/composer.json index ec56dc8..5341718 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ }, "require-dev": { "devster/ubench": "^2.1", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^11.4", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.4.0", diff --git a/src/Resolver/GeoLite2LocationResolver.php b/src/Resolver/GeoLite2LocationResolver.php index cfbbc9e..edb02f4 100644 --- a/src/Resolver/GeoLite2LocationResolver.php +++ b/src/Resolver/GeoLite2LocationResolver.php @@ -45,7 +45,7 @@ private function mapFields(City $city): Model\Location return new Model\Location( $city->country->isoCode ?? '', $city->country->name ?? '', - $city->subdivisions[0]?->name ?? '', + $city->subdivisions[0]->name ?? '', $city->city->name ?? '', (float) ($city->location->latitude ?? 0.0), (float) ($city->location->longitude ?? 0.0),