diff --git a/composer.json b/composer.json index 35ae979..e3cd594 100644 --- a/composer.json +++ b/composer.json @@ -50,9 +50,9 @@ "laminas/laminas-config-aggregator": "^1.14", "laminas/laminas-servicemanager": "^3.22.1", "maglnet/composer-require-checker": "^4.7.1", - "phpunit/phpunit": "^10.5.7", + "phpunit/phpunit": "^10.5.9", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.19" + "vimeo/psalm": "^5.20" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index ff5de38..2a8be16 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1246a1962f86403a55ec5b7e29046ed", + "content-hash": "74c8408e8945715d6d26441edcee2ce8", "packages": [ { "name": "giggsey/libphonenumber-for-php", - "version": "8.13.27", + "version": "8.13.28", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php.git", - "reference": "033bea996defd39bddca9de22b9e9dbda419431c" + "reference": "f508ab946a60c1470c92e33cfc0393a0d580b9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/033bea996defd39bddca9de22b9e9dbda419431c", - "reference": "033bea996defd39bddca9de22b9e9dbda419431c", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/f508ab946a60c1470c92e33cfc0393a0d580b9a1", + "reference": "f508ab946a60c1470c92e33cfc0393a0d580b9a1", "shasum": "" }, "require": { @@ -76,7 +76,7 @@ "issues": "https://github.com/giggsey/libphonenumber-for-php/issues", "source": "https://github.com/giggsey/libphonenumber-for-php" }, - "time": "2023-12-19T08:19:08+00:00" + "time": "2024-01-17T08:09:20+00:00" }, { "name": "giggsey/locale", @@ -636,16 +636,16 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" + "reference": "6a192dd0882b514e45506f533b833b623b78fff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3", + "reference": "6a192dd0882b514e45506f533b833b623b78fff3", "shasum": "" }, "require": { @@ -656,10 +656,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.14", - "phpunit/phpunit": "^10.3.3", + "phpbench/phpbench": "^1.2.15", + "phpunit/phpunit": "^10.5.8", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15.0" + "vimeo/psalm": "^5.20.0" }, "type": "library", "autoload": { @@ -691,20 +691,20 @@ "type": "community_bridge" } ], - "time": "2023-09-19T10:15:21+00:00" + "time": "2024-01-19T12:39:49+00:00" }, { "name": "laminas/laminas-validator", - "version": "2.46.0", + "version": "2.47.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329" + "reference": "5c3fc8c4f1263cda5c5f14aed874fdadd5b90bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/98330256f8d8a1357a93f6f7f1a987036aff6329", - "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/5c3fc8c4f1263cda5c5f14aed874fdadd5b90bbd", + "reference": "5c3fc8c4f1263cda5c5f14aed874fdadd5b90bbd", "shasum": "" }, "require": { @@ -775,7 +775,7 @@ "type": "community_bridge" } ], - "time": "2024-01-03T12:43:04+00:00" + "time": "2024-01-17T11:31:50+00:00" }, { "name": "psr/container", @@ -2816,16 +2816,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.7", + "version": "10.5.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8" + "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e5c5b397a95cb0db013270a985726fcae93e61b8", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", + "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", "shasum": "" }, "require": { @@ -2897,7 +2897,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.9" }, "funding": [ { @@ -2913,7 +2913,7 @@ "type": "tidelift" } ], - "time": "2024-01-14T16:40:30+00:00" + "time": "2024-01-22T14:35:40+00:00" }, { "name": "psalm/plugin-phpunit", @@ -4835,16 +4835,16 @@ }, { "name": "vimeo/psalm", - "version": "5.19.0", + "version": "5.20.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", "shasum": "" }, "require": { @@ -4941,7 +4941,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-09T21:02:43+00:00" + "time": "2024-01-18T12:15:06+00:00" }, { "name": "webimpress/coding-standard", diff --git a/src/PhoneNumberValue.php b/src/PhoneNumberValue.php index 826f317..21fd9fc 100644 --- a/src/PhoneNumberValue.php +++ b/src/PhoneNumberValue.php @@ -190,7 +190,7 @@ public function type(): int private static function regionCodeForNumber(LibPhoneNumber $number, ?string $givenCode): ?string { $dialingCode = $number->getCountryCode(); - if (! $dialingCode) { + if ($dialingCode === null) { return $givenCode; } diff --git a/src/Validator/PhoneNumber.php b/src/Validator/PhoneNumber.php index 959ee25..b6f52c2 100644 --- a/src/Validator/PhoneNumber.php +++ b/src/Validator/PhoneNumber.php @@ -190,7 +190,7 @@ public function setAllowedTypes(int $types): void /** @param array $validationContext */ private function resolveCountry(?array $validationContext): ?CountryCode { - if (! is_array($validationContext) || ! $this->countryContext) { + if (! is_array($validationContext) || $this->countryContext === null) { return $this->country; } diff --git a/src/View/Helper/PhoneNumberFormat.php b/src/View/Helper/PhoneNumberFormat.php index 98ba95a..5832710 100644 --- a/src/View/Helper/PhoneNumberFormat.php +++ b/src/View/Helper/PhoneNumberFormat.php @@ -25,7 +25,7 @@ public function __invoke(): self */ private function coalesceCountryCode(?string $countryCodeOrLocale): CountryCode { - $code = $countryCodeOrLocale ? CountryCode::tryFromString($countryCodeOrLocale) : null; + $code = $countryCodeOrLocale !== null ? CountryCode::tryFromString($countryCodeOrLocale) : null; return $code ?? $this->defaultCountryCode; } diff --git a/test/ProjectIntegrationTestCase.php b/test/ProjectIntegrationTestCase.php index 707b3e3..3e9a1bb 100644 --- a/test/ProjectIntegrationTestCase.php +++ b/test/ProjectIntegrationTestCase.php @@ -32,9 +32,9 @@ protected static function getContainer(array $userConfig = []): ContainerInterfa $config = $aggregator->getMergedConfig(); $dependencies = $config['dependencies'] ?? []; self::assertIsArray($dependencies); - /** @psalm-var ServiceManagerConfigurationType $dependencies */ - unset($dependencies['services']['config']); + /** @psalm-suppress MixedArrayAssignment */ $dependencies['services']['config'] = $config; + /** @psalm-var ServiceManagerConfigurationType $dependencies */ return new Laminas\ServiceManager\ServiceManager($dependencies); }