diff --git a/composer.json b/composer.json index a42d910..17f3aac 100644 --- a/composer.json +++ b/composer.json @@ -38,8 +38,7 @@ "phpstan/phpstan-deprecation-rules": "^1.1.4", "phpstan/phpstan-phpunit": "^1.3.15", "phpunit/phpunit": "^10.4.1", - "rector/rector": "^0.18.6", - "vimeo/psalm": "^5.15.0" + "rector/rector": "^0.18.6" }, "suggest": { "laminas/laminas-modulemanager": "Required for Module Integration", diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index 9c7d891..0000000 --- a/psalm.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/src/Router/HostName.php b/src/Router/HostName.php index 1ce1f85..7f39d2f 100644 --- a/src/Router/HostName.php +++ b/src/Router/HostName.php @@ -24,7 +24,6 @@ use function array_key_exists; use function array_keys; use function array_map; -use function array_merge; use function assert; use function count; use function in_array; @@ -146,7 +145,7 @@ public function match(Request $request): RouteMatch | null $this->port = $uri->getPort(); $this->host = $host; - return new RouteMatch(array_merge($this->defaults, ['host' => rawurldecode($host)])); + return new RouteMatch([...$this->defaults, 'host' => rawurldecode($host)]); } /** diff --git a/tests/Router/HostNameFactoryTest.php b/tests/Router/HostNameFactoryTest.php index d16c0a0..c00abdb 100644 --- a/tests/Router/HostNameFactoryTest.php +++ b/tests/Router/HostNameFactoryTest.php @@ -31,7 +31,7 @@ protected function setUp(): void $this->object = new HostNameFactory(); } - /** @throws void */ + /** @throws ServiceNotCreatedException */ public function testInvokeWithoutOptions(): void { $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); @@ -44,7 +44,7 @@ public function testInvokeWithoutOptions(): void ($this->object)($container, 'test'); } - /** @throws void */ + /** @throws ServiceNotCreatedException */ public function testInvokeFailed(): void { $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); @@ -57,7 +57,10 @@ public function testInvokeFailed(): void ($this->object)($container, 'test', []); } - /** @throws Exception */ + /** + * @throws Exception + * @throws ServiceNotCreatedException + */ public function testInvoke(): void { $container = $this->getMockBuilder(ContainerInterface::class)->getMock();